Package org.apache.http.auth
Class AuthState
java.lang.Object
org.apache.http.auth.AuthState
This class provides detailed information about the state of the authentication process.
- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns availableAuthOption
s.Returns actualAuthScheme
.Deprecated.(4.2) do not use.Returns actualCredentials
.getState()
boolean
void
Deprecated.(4.2) usereset()
boolean
Returnstrue
if the actual authentication scheme is connection based.boolean
isValid()
Deprecated.(4.2) do not usevoid
reset()
Resets the auth state.void
setAuthScheme
(AuthScheme authScheme) Deprecated.(4.2) useupdate(AuthScheme, Credentials)
void
setAuthScope
(AuthScope authScope) Deprecated.(4.2) do not use.void
setCredentials
(Credentials credentials) Deprecated.(4.2) useupdate(AuthScheme, Credentials)
void
setState
(AuthProtocolState state) toString()
void
update
(Queue<AuthOption> authOptions) Updates the auth state with a queue ofAuthOption
s.void
update
(AuthScheme authScheme, Credentials credentials) Updates the auth state withAuthScheme
andCredentials
.
-
Constructor Details
-
AuthState
public AuthState()
-
-
Method Details
-
reset
public void reset()Resets the auth state.- Since:
- 4.2
-
getState
- Since:
- 4.2
-
setState
- Since:
- 4.2
-
getAuthScheme
Returns actualAuthScheme
. May be null. -
getCredentials
Returns actualCredentials
. May be null. -
update
Updates the auth state withAuthScheme
andCredentials
.- Parameters:
authScheme
- auth scheme. May not be null.credentials
- user crednetials. May not be null.- Since:
- 4.2
-
getAuthOptions
Returns availableAuthOption
s. May be null.- Since:
- 4.2
-
hasAuthOptions
public boolean hasAuthOptions()- Since:
- 4.2
-
isConnectionBased
public boolean isConnectionBased()Returnstrue
if the actual authentication scheme is connection based.- Since:
- 4.5.6
-
update
Updates the auth state with a queue ofAuthOption
s.- Parameters:
authOptions
- a queue of auth options. May not be null or empty.- Since:
- 4.2
-
invalidate
Deprecated.(4.2) usereset()
Invalidates the authentication state by resetting its parameters. -
isValid
Deprecated.(4.2) do not use -
setAuthScheme
Deprecated.(4.2) useupdate(AuthScheme, Credentials)
Assigns the givenauthentication scheme
.- Parameters:
authScheme
- theauthentication scheme
-
setCredentials
Deprecated.(4.2) useupdate(AuthScheme, Credentials)
Sets userCredentials
to be used for authentication- Parameters:
credentials
- User credentials
-
getAuthScope
Deprecated.(4.2) do not use.Returns actualAuthScope
if available- Returns:
- actual authentication scope if available,
null
otherwise
-
setAuthScope
Deprecated.(4.2) do not use.Sets actualAuthScope
.- Parameters:
authScope
- Authentication scope
-
toString
-