Class OAuth2ErrorCodes

java.lang.Object
org.springframework.security.oauth2.core.OAuth2ErrorCodes

public final class OAuth2ErrorCodes extends Object
Standard error codes defined by the OAuth 2.0 Authorization Framework.
Since:
5.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    access_denied - The resource owner or authorization server denied the request.
    static final String
    insufficient_scope - The request requires higher privileges than provided by the access token.
    static final String
    invalid_client - Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).
    static final String
    invalid_grant - The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.
    static final String
    invalid_redirect_uri - The value of one or more redirection URIs is invalid.
    static final String
    invalid_request - The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.
    static final String
    invalid_scope - The requested scope is invalid, unknown, malformed or exceeds the scope granted by the resource owner.
    static final String
    invalid_token - The access token provided is expired, revoked, malformed, or invalid for other reasons.
    static final String
    server_error - The authorization server encountered an unexpected condition that prevented it from fulfilling the request.
    static final String
    temporarily_unavailable - The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
    static final String
    unauthorized_client - The client is not authorized to request an authorization code or access token using this method.
    static final String
    unsupported_grant_type - The authorization grant type is not supported by the authorization server.
    static final String
    unsupported_response_type - The authorization server does not support obtaining an authorization code or access token using this method.
    static final String
    unsupported_token_type - The authorization server does not support the revocation of the presented token type.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INVALID_REQUEST

      public static final String INVALID_REQUEST
      invalid_request - The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.
      See Also:
    • UNAUTHORIZED_CLIENT

      public static final String UNAUTHORIZED_CLIENT
      unauthorized_client - The client is not authorized to request an authorization code or access token using this method.
      See Also:
    • ACCESS_DENIED

      public static final String ACCESS_DENIED
      access_denied - The resource owner or authorization server denied the request.
      See Also:
    • UNSUPPORTED_RESPONSE_TYPE

      public static final String UNSUPPORTED_RESPONSE_TYPE
      unsupported_response_type - The authorization server does not support obtaining an authorization code or access token using this method.
      See Also:
    • INVALID_SCOPE

      public static final String INVALID_SCOPE
      invalid_scope - The requested scope is invalid, unknown, malformed or exceeds the scope granted by the resource owner.
      See Also:
    • INSUFFICIENT_SCOPE

      public static final String INSUFFICIENT_SCOPE
      insufficient_scope - The request requires higher privileges than provided by the access token. The resource server SHOULD respond with the HTTP 403 (Forbidden) status code and MAY include the "scope" attribute with the scope necessary to access the protected resource.
      See Also:
    • INVALID_TOKEN

      public static final String INVALID_TOKEN
      invalid_token - The access token provided is expired, revoked, malformed, or invalid for other reasons. The resource SHOULD respond with the HTTP 401 (Unauthorized) status code. The client MAY request a new access token and retry the protected resource request.
      See Also:
    • SERVER_ERROR

      public static final String SERVER_ERROR
      server_error - The authorization server encountered an unexpected condition that prevented it from fulfilling the request. (This error code is needed because a 500 Internal Server Error HTTP status code cannot be returned to the client via a HTTP redirect.)
      See Also:
    • TEMPORARILY_UNAVAILABLE

      public static final String TEMPORARILY_UNAVAILABLE
      temporarily_unavailable - The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server. (This error code is needed because a 503 Service Unavailable HTTP status code cannot be returned to the client via an HTTP redirect.)
      See Also:
    • INVALID_CLIENT

      public static final String INVALID_CLIENT
      invalid_client - Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method). The authorization server MAY return a HTTP 401 (Unauthorized) status code to indicate which HTTP authentication schemes are supported. If the client attempted to authenticate via the "Authorization" request header field, the authorization server MUST respond with a HTTP 401 (Unauthorized) status code and include the "WWW-Authenticate" response header field matching the authentication scheme used by the client.
      See Also:
    • INVALID_GRANT

      public static final String INVALID_GRANT
      invalid_grant - The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.
      See Also:
    • UNSUPPORTED_GRANT_TYPE

      public static final String UNSUPPORTED_GRANT_TYPE
      unsupported_grant_type - The authorization grant type is not supported by the authorization server.
      See Also:
    • UNSUPPORTED_TOKEN_TYPE

      public static final String UNSUPPORTED_TOKEN_TYPE
      unsupported_token_type - The authorization server does not support the revocation of the presented token type.
      Since:
      5.5
      See Also:
    • INVALID_REDIRECT_URI

      public static final String INVALID_REDIRECT_URI
      invalid_redirect_uri - The value of one or more redirection URIs is invalid.
      Since:
      5.6
      See Also: