# Google Data APIs Client Library (1.43.0)

## com.google.gdata.util
Class AuthenticationException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              com.google.gdata.util.ServiceException
                  com.google.gdata.util.AuthenticationException

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  GoogleService.AccountDeletedException, GoogleService.AccountDisabledException, GoogleService.CaptchaRequiredException, GoogleService.InvalidCredentialsException, GoogleService.NotVerifiedException, GoogleService.ServiceUnavailableException, GoogleService.SessionExpiredException, GoogleService.TermsNotAgreedException

    public class AuthenticationException

extends ServiceException

The AuthenticationException class is used to represent a GData service failure due to authentication.

See Also:
  Serialized Form

Constructor Summary
`AuthenticationException(java.net.HttpURLConnection httpConn)` Constructs a new AuthenticationException using header and error stream information from an HTTP connection.
`AuthenticationException(java.lang.String message)` Creates a new AuthenticationException without any authentication header information.
`AuthenticationException(java.lang.String message, java.lang.String authHeader)` Constructs a new AuthenticationException instance based upon the contents of a WWW-Authenticate header as described by RFC2617.

Method Summary
`java.lang.String` `getAuthHeader()`
`java.util.Map<java.lang.String,java.lang.String>` `getParameters()`
`java.lang.String` `getRealm()`
`java.lang.String` `getScheme()`

Methods inherited from class com.google.gdata.util.ServiceException

`addSibling, getCodeName, getDebugInfo, getDomainName, getExtendedHelp, getHttpErrorCodeOverride, getHttpHeader, getHttpHeaders, getInternalReason, getLocation, getLocationType, getMessage, getOAuthProxyResponse, getResponseBody, getResponseContentType, getSendReport, getSiblings, hasOAuthProxyResponse, initCause, matches, matchesAny, setCode, setDebugInfo, setDomain, setExtendedHelp, setHeaderLocation, setHttpErrorCodeOverride, setInternalReason, setLocation, setResponse, setResponseBody, setResponseContentType, setSendReport, setXpathLocation, toString, toXmlErrorMessage, toXmlErrorMessage`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

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

Constructor Detail

### AuthenticationException

    public AuthenticationException(java.lang.String message,
                                   java.lang.String authHeader)

  Constructs a new AuthenticationException instance based upon the contents of a WWW-Authenticate header as described by RFC2617.

### AuthenticationException

    public AuthenticationException(java.lang.String message)

  Creates a new AuthenticationException without any authentication header information. The WWW-Authenticate header will have to be set separately to build a valid HTTP 401 error response.

### AuthenticationException

    public AuthenticationException(java.net.HttpURLConnection httpConn)
                            throws java.io.IOException

  Constructs a new AuthenticationException using header and error stream information from an HTTP connection.

  Throws:
    `java.io.IOException`

Method Detail

### getScheme

    public java.lang.String getScheme()

### getRealm

    public java.lang.String getRealm()

### getParameters

    public java.util.Map<java.lang.String,java.lang.String> getParameters()

### getAuthHeader

    public java.lang.String getAuthHeader()