Package org.apache.hc.client5.http.auth
Class AuthExchange
java.lang.Object
org.apache.hc.client5.http.auth.AuthExchange
This class represents the actual state of authentication handshake including the current
AuthScheme
used for request authorization as well as a collection of backup authentication options if available.- Since:
- 4.5
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Queue<AuthScheme> private AuthSchemeprivate Stringprivate AuthExchange.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns available auth options.Returns actualAuthScheme.getState()booleanReturnstrueif the actual authentication scheme is connection based.voidreset()voidselect(AuthScheme authScheme) Resets the auth state withAuthSchemeand clears auth options.voidsetOptions(Queue<AuthScheme> authOptions) Updates the auth state with a queue of auth options.voidsetPathPrefix(String pathPrefix) voidsetState(AuthExchange.State state) toString()
-
Field Details
-
state
-
authScheme
-
authOptions
-
pathPrefix
-
-
Constructor Details
-
AuthExchange
public AuthExchange()
-
-
Method Details
-
reset
public void reset() -
getState
-
setState
-
getAuthScheme
Returns actualAuthScheme. May be null. -
isConnectionBased
public boolean isConnectionBased()Returnstrueif the actual authentication scheme is connection based. -
getPathPrefix
- Since:
- 5.2
-
setPathPrefix
- Since:
- 5.2
-
select
Resets the auth state withAuthSchemeand clears auth options.- Parameters:
authScheme- auth scheme. May not be null.
-
getAuthOptions
Returns available auth options. May be null. -
setOptions
Updates the auth state with a queue of auth options.- Parameters:
authOptions- a queue of auth options. May not be null or empty.
-
toString
-