Class AuthState

java.lang.Object
org.apache.http.auth.AuthState

public class AuthState
extends Object
This class provides detailed information about the state of the authentication process.
Since:
4.0
Author:
Oleg Kalnichevski
  • Constructor Details

    • AuthState

      public AuthState()
      Default constructor.
  • Method Details

    • invalidate

      public void invalidate()
      Invalidates the authentication state by resetting its parameters.
    • isValid

      public boolean isValid()
    • setAuthScheme

      public void setAuthScheme​(AuthScheme authScheme)
      Assigns the given authentication scheme.
      Parameters:
      authScheme - the authentication scheme
    • getAuthScheme

      public AuthScheme getAuthScheme()
      Returns:
      authentication scheme
    • getCredentials

      public Credentials getCredentials()
      Returns user Credentials selected for authentication if available
      Returns:
      user credentials if available, null
    • setCredentials

      public void setCredentials​(Credentials credentials)
      Sets user Credentials to be used for authentication
      Parameters:
      credentials - User credentials
    • getAuthScope

      public AuthScope getAuthScope()
      Returns actual AuthScope if available
      Returns:
      actual authentication scope if available, null
    • setAuthScope

      public void setAuthScope​(AuthScope authScope)
      Sets actual AuthScope.
      Parameters:
      authScope - Authentication scope
    • toString

      public String toString()
      Description copied from class: Object
      Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
         getClass().getName() + '@' + Integer.toHexString(hashCode())

      See Writing a useful toString method if you intend implementing your own toString method.

      Overrides:
      toString in class Object
      Returns:
      a printable representation of this object.