Class OAuth2Error

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    BearerTokenError

    public class OAuth2Error
    extends java.lang.Object
    implements java.io.Serializable
    A representation of an OAuth 2.0 Error.

    At a minimum, an error response will contain an error code. The error code may be one of the standard codes defined by the specification, or a new code defined in the OAuth Extensions Error Registry, for cases where protocol extensions require additional error code(s) above the standard codes.

    Since:
    5.0
    See Also:
    OAuth2ErrorCodes, Section 11.4 OAuth Extensions Error Registry, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      OAuth2Error​(java.lang.String errorCode)
      Constructs an OAuth2Error using the provided parameters.
      OAuth2Error​(java.lang.String errorCode, java.lang.String description, java.lang.String uri)
      Constructs an OAuth2Error using the provided parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Returns the error description.
      java.lang.String getErrorCode()
      Returns the error code.
      java.lang.String getUri()
      Returns the error uri.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • OAuth2Error

        public OAuth2Error​(java.lang.String errorCode)
        Constructs an OAuth2Error using the provided parameters.
        Parameters:
        errorCode - the error code
      • OAuth2Error

        public OAuth2Error​(java.lang.String errorCode,
                           java.lang.String description,
                           java.lang.String uri)
        Constructs an OAuth2Error using the provided parameters.
        Parameters:
        errorCode - the error code
        description - the error description
        uri - the error uri
    • Method Detail

      • getErrorCode

        public final java.lang.String getErrorCode()
        Returns the error code.
        Returns:
        the error code
      • getDescription

        public final java.lang.String getDescription()
        Returns the error description.
        Returns:
        the error description
      • getUri

        public final java.lang.String getUri()
        Returns the error uri.
        Returns:
        the error uri
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object