Enum TokenType

    • 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​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getName

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

        public static TokenType fromName​(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.