Enum TokenType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TokenType>

    public enum TokenType
    extends java.lang.Enum<TokenType>
    The Enum TokenType.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BEARER
      Any party in possession of a bearer token (a "bearer") can use it to get access to the associated resources (without demonstrating possession of a cryptographic key).
      MAC
      Use MAC Tokens in HTTP requests to access OAuth 2.0 protected resources.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static TokenType fromName​(java.lang.String aName)
      Returns that TokenType represented by the given name.
      java.lang.String getName()
      Gets the name.
      static TokenType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static TokenType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • BEARER

        public static final TokenType BEARER
        Any party in possession of a bearer token (a "bearer") can use it to get access to the associated resources (without demonstrating possession of a cryptographic key). To prevent misuse, bearer tokens need to be protected from disclosure in storage and in transport. Provide this TokenType in an HTTP-Header HeaderField.TOKEN_TYPE in case you want to use the BEARER token type. See also "https://tools.ietf.org/html/rfc6750"
      • MAC

        public static final TokenType MAC
        Use MAC Tokens in HTTP requests to access OAuth 2.0 protected resources. An OAuth client willing to access a protected resource needs to demonstrate possession of a cryptographic key by using it with a keyed message digest function to the request. See also "https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-05" Provide this TokenType in an HTTP-Header HeaderField.TOKEN_TYPE in case you want to use the MAC token type.
    • Method Detail

      • values

        public static TokenType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TokenType c : TokenType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TokenType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getName

        public java.lang.String getName()
        Gets the name.
        Returns:
        the name
      • fromName

        public static TokenType fromName​(java.lang.String aName)
        Returns that TokenType represented by the given name.
        Parameters:
        aName - The name for which to determine the TokenType.
        Returns:
        The determined TokenType or null if none was determinable.