Class TypelessToken

    • Constructor Detail

      • TypelessToken

        public TypelessToken​(String value)
        Creates a new typeless token with the specified value.
        Parameters:
        value - The token value. Must not be null or empty string.
    • Method Detail

      • getParameterNames

        public Set<StringgetParameterNames()
        Description copied from class: Token
        Returns the token parameter names included in the JSON object, as required for the composition of an access token response. See OAuth 2.0 (RFC 6749), section 5.1.
        Specified by:
        getParameterNames in class Token
        Returns:
        The token parameter names.
      • toJSONObject

        public net.minidev.json.JSONObject toJSONObject()
        Description copied from class: Token
        Returns the token parameters as a JSON object, as required for the composition of an access token response. See OAuth 2.0 (RFC 6749), section 5.1.

        Note that JSONObject implements Map&lt;String,Object&gt;.

        Example:

         {
           "access_token"      : "2YotnFZFEjr1zCsicMWpAA",
           "token_type"        : "example",
           "expires_in"        : 3600,
           "example_parameter" : "example_value"
         }
         
        Specified by:
        toJSONObject in class Token
        Returns:
        The token parameters as a JSON object.