Package org.apache.http.auth
Class AuthState
- java.lang.Object
-
- org.apache.http.auth.AuthState
-
public class AuthState extends java.lang.ObjectThis class provides detailed information about the state of the authentication process.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description AuthState()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Queue<AuthOption>getAuthOptions()Returns availableAuthOptions.AuthSchemegetAuthScheme()Returns actualAuthScheme.AuthScopegetAuthScope()Deprecated.(4.2) do not use.CredentialsgetCredentials()Returns actualCredentials.AuthProtocolStategetState()booleanhasAuthOptions()voidinvalidate()Deprecated.(4.2) usereset()booleanisConnectionBased()Returnstrueif the actual authentication scheme is connection based.booleanisValid()Deprecated.(4.2) do not usevoidreset()Resets the auth state.voidsetAuthScheme(AuthScheme authScheme)Deprecated.(4.2) useupdate(AuthScheme, Credentials)voidsetAuthScope(AuthScope authScope)Deprecated.(4.2) do not use.voidsetCredentials(Credentials credentials)Deprecated.(4.2) useupdate(AuthScheme, Credentials)voidsetState(AuthProtocolState state)java.lang.StringtoString()voidupdate(java.util.Queue<AuthOption> authOptions)Updates the auth state with a queue ofAuthOptions.voidupdate(AuthScheme authScheme, Credentials credentials)Updates the auth state withAuthSchemeandCredentials.
-
-
-
Method Detail
-
reset
public void reset()
Resets the auth state.- Since:
- 4.2
-
getState
public AuthProtocolState getState()
- Since:
- 4.2
-
setState
public void setState(AuthProtocolState state)
- Since:
- 4.2
-
getAuthScheme
public AuthScheme getAuthScheme()
Returns actualAuthScheme. May be null.
-
getCredentials
public Credentials getCredentials()
Returns actualCredentials. May be null.
-
update
public void update(AuthScheme authScheme, Credentials credentials)
Updates the auth state withAuthSchemeandCredentials.- Parameters:
authScheme- auth scheme. May not be null.credentials- user crednetials. May not be null.- Since:
- 4.2
-
getAuthOptions
public java.util.Queue<AuthOption> getAuthOptions()
Returns availableAuthOptions. May be null.- Since:
- 4.2
-
hasAuthOptions
public boolean hasAuthOptions()
- Since:
- 4.2
-
isConnectionBased
public boolean isConnectionBased()
Returnstrueif the actual authentication scheme is connection based.- Since:
- 4.5.6
-
update
public void update(java.util.Queue<AuthOption> authOptions)
Updates the auth state with a queue ofAuthOptions.- Parameters:
authOptions- a queue of auth options. May not be null or empty.- Since:
- 4.2
-
invalidate
@Deprecated public void invalidate()
Deprecated.(4.2) usereset()Invalidates the authentication state by resetting its parameters.
-
isValid
@Deprecated public boolean isValid()
Deprecated.(4.2) do not use
-
setAuthScheme
@Deprecated public void setAuthScheme(AuthScheme authScheme)
Deprecated.(4.2) useupdate(AuthScheme, Credentials)Assigns the givenauthentication scheme.- Parameters:
authScheme- theauthentication scheme
-
setCredentials
@Deprecated public void setCredentials(Credentials credentials)
Deprecated.(4.2) useupdate(AuthScheme, Credentials)Sets userCredentialsto be used for authentication- Parameters:
credentials- User credentials
-
getAuthScope
@Deprecated public AuthScope getAuthScope()
Deprecated.(4.2) do not use.Returns actualAuthScopeif available- Returns:
- actual authentication scope if available,
nullotherwise
-
setAuthScope
@Deprecated public void setAuthScope(AuthScope authScope)
Deprecated.(4.2) do not use.Sets actualAuthScope.- Parameters:
authScope- Authentication scope
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-