## org.apache.http.auth
Class AuthState

    java.lang.Object
      org.apache.http.auth.AuthState

    @NotThreadSafe
    public class AuthState

extends Object

This class provides detailed information about the state of the authentication process.

Since:
  4.0

Constructor Summary
`AuthState()` Default constructor.

Method Summary
`AuthScheme` `getAuthScheme()` Returns the `authentication scheme`.
`AuthScope` `getAuthScope()` Returns actual `AuthScope` if available
`Credentials` `getCredentials()` Returns user `Credentials` selected for authentication if available
`void` `invalidate()` Invalidates the authentication state by resetting its parameters.
`boolean` `isValid()`
`void` `setAuthScheme(AuthScheme authScheme)` Assigns the given `authentication scheme`.
`void` `setAuthScope(AuthScope authScope)` Sets actual `AuthScope`.
`void` `setCredentials(Credentials credentials)` Sets user `Credentials` to be used for authentication
`String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AuthState

    public AuthState()

  Default constructor.

Method Detail

### invalidate

    public void invalidate()

  Invalidates the authentication state by resetting its parameters.

### isValid

    public boolean isValid()

### setAuthScheme

    public void setAuthScheme(AuthScheme authScheme)

  Assigns the given `authentication scheme`.

  Parameters:
    `authScheme` - the `authentication scheme`

### getAuthScheme

    public AuthScheme getAuthScheme()

  Returns the `authentication scheme`.

  Returns:
    `authentication scheme`

### getCredentials

    public Credentials getCredentials()

  Returns user `Credentials` selected for authentication if available

  Returns:
    user credentials if available, `null`

  ### setCredentials

      public void setCredentials(Credentials credentials)

    Sets user `Credentials` to be used for authentication

    Parameters:
      `credentials` - User credentials

  ### getAuthScope

      public AuthScope getAuthScope()

    Returns actual `AuthScope` if available

    Returns:
      actual authentication scope if available, `null`

    ### setAuthScope

        public void setAuthScope(AuthScope authScope)

      Sets actual `AuthScope`.

      Parameters:
        `authScope` - Authentication scope

    ### toString

        public String toString()

      Overrides:
        `toString` in class `Object`

    Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.