org.apache.http.auth
Class AuthState

java.lang.Object
  extended by 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

Constructor Summary
AuthState()
           
 
Method Summary
 Queue<AuthOption> getAuthOptions()
          Returns available AuthOptions.
 AuthScheme getAuthScheme()
          Returns actual AuthScheme.
 AuthScope getAuthScope()
          Deprecated. (4.2) do not use.
 Credentials getCredentials()
          Returns actual Credentials.
 AuthProtocolState getState()
           
 boolean hasAuthOptions()
          Returns true if AuthOptions are available, false otherwise.
 void invalidate()
          Deprecated. (4.2) use reset()
 boolean isConnectionBased()
          Returns true if the actual authentication scheme is connection based.
 boolean isValid()
          Deprecated. (4.2) do not use
 void reset()
          Resets the auth state.
 void setAuthScheme(AuthScheme authScheme)
          Deprecated. (4.2) use update(AuthScheme, Credentials)
 void setAuthScope(AuthScope authScope)
          Deprecated. (4.2) do not use.
 void setCredentials(Credentials credentials)
          Deprecated. (4.2) use update(AuthScheme, Credentials)
 void setState(AuthProtocolState state)
           
 String toString()
           
 void update(AuthScheme authScheme, Credentials credentials)
          Updates the auth state with AuthScheme and Credentials.
 void update(Queue<AuthOption> authOptions)
          Updates the auth state with a queue of AuthOptions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthState

public AuthState()
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 actual AuthScheme. May be null.


getCredentials

public Credentials getCredentials()
Returns actual Credentials. May be null.


update

public void update(AuthScheme authScheme,
                   Credentials credentials)
Updates the auth state with AuthScheme and Credentials.

Parameters:
authScheme - auth scheme. May not be null.
credentials - user crednetials. May not be null.
Since:
4.2

getAuthOptions

public Queue<AuthOption> getAuthOptions()
Returns available AuthOptions. May be null.

Since:
4.2

hasAuthOptions

public boolean hasAuthOptions()
Returns true if AuthOptions are available, false otherwise.

Since:
4.2

isConnectionBased

public boolean isConnectionBased()
Returns true if the actual authentication scheme is connection based.

Since:
4.5.6

update

public void update(Queue<AuthOption> authOptions)
Updates the auth state with a queue of AuthOptions.

Parameters:
authOptions - a queue of auth options. May not be null or empty.
Since:
4.2

invalidate

@Deprecated
public void invalidate()
Deprecated. (4.2) use reset()

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) use update(AuthScheme, Credentials)

Assigns the given authentication scheme.

Parameters:
authScheme - the authentication scheme

setCredentials

@Deprecated
public void setCredentials(Credentials credentials)
Deprecated. (4.2) use update(AuthScheme, Credentials)

Sets user Credentials to be used for authentication

Parameters:
credentials - User credentials

getAuthScope

@Deprecated
public AuthScope getAuthScope()
Deprecated. (4.2) do not use.

Returns actual AuthScope if available

Returns:
actual authentication scope if available, null otherwise

setAuthScope

@Deprecated
public void setAuthScope(AuthScope authScope)
Deprecated. (4.2) do not use.

Sets actual AuthScope.

Parameters:
authScope - Authentication scope

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1999–2019 The Apache Software Foundation. All rights reserved.