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 AuthScheme
private String
private AuthExchange.State
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns available auth options.Returns actualAuthScheme
.getState()
boolean
Returnstrue
if the actual authentication scheme is connection based.void
reset()
void
select
(AuthScheme authScheme) Resets the auth state withAuthScheme
and clears auth options.void
setOptions
(Queue<AuthScheme> authOptions) Updates the auth state with a queue of auth options.void
setPathPrefix
(String pathPrefix) void
setState
(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()Returnstrue
if the actual authentication scheme is connection based. -
getPathPrefix
- Since:
- 5.2
-
setPathPrefix
- Since:
- 5.2
-
select
Resets the auth state withAuthScheme
and 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
-