Package org.apache.http.auth
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 Summary
Constructors Constructor Description AuthState()Default constructor. -
Method Summary
Modifier and Type Method Description AuthSchemegetAuthScheme()Returns theauthentication scheme.AuthScopegetAuthScope()Returns actualAuthScopeif availableCredentialsgetCredentials()Returns userCredentialsselected for authentication if availablevoidinvalidate()Invalidates the authentication state by resetting its parameters.booleanisValid()voidsetAuthScheme(AuthScheme authScheme)Assigns the givenauthentication scheme.voidsetAuthScope(AuthScope authScope)Sets actualAuthScope.voidsetCredentials(Credentials credentials)Sets userCredentialsto be used for authenticationStringtoString()Returns a string containing a concise, human-readable description of this object.
-
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
Assigns the givenauthentication scheme.- Parameters:
authScheme- theauthentication scheme
-
getAuthScheme
Returns theauthentication scheme.- Returns:
authentication scheme
-
getCredentials
Returns userCredentialsselected for authentication if available- Returns:
- user credentials if available,
null
-
setCredentials
Sets userCredentialsto be used for authentication- Parameters:
credentials- User credentials
-
getAuthScope
Returns actualAuthScopeif available- Returns:
- actual authentication scope if available,
null
-
setAuthScope
Sets actualAuthScope.- Parameters:
authScope- Authentication scope
-
toString
Description copied from class:ObjectReturns 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
toStringmethod if you intend implementing your owntoStringmethod.
-