Class DeviceSecretToken

java.lang.Object
com.nimbusds.oauth2.sdk.id.Identifier
com.nimbusds.oauth2.sdk.token.Token
com.nimbusds.openid.connect.sdk.nativesso.DeviceSecretToken
All Implemented Interfaces:
Serializable, Comparable<Identifier>, net.minidev.json.JSONAware

@Immutable public final class DeviceSecretToken extends Token
Token representation of a device secret.

Related specifications:

  • OpenID Connect Native SSO for Mobile Apps 1.0
See Also:
  • Constructor Details

    • DeviceSecretToken

      public DeviceSecretToken(DeviceSecret deviceSecret)
      Creates a new device secret token.
      Parameters:
      deviceSecret - The device secret. Must not be null.
  • Method Details

    • getDeviceSecret

      Returns the device secret.
      Returns:
      The device secret.
    • getParameterNames

      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.
    • parse

      public static DeviceSecretToken parse(net.minidev.json.JSONObject jsonObject) throws ParseException
      Parses a device secret token from a JSON object access token response.
      Parameters:
      jsonObject - The JSON object to parse. Must not be null.
      Returns:
      The device secret token, null if not found.
      Throws:
      ParseException - If the JSON object couldn't be parsed to a device secret token.
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Identifier