Class TokenExchangeAuthorization

    • Constructor Detail

      • TokenExchangeAuthorization

        public TokenExchangeAuthorization​(com.nimbusds.oauth2.sdk.id.Subject subject,
                                          com.nimbusds.oauth2.sdk.Scope scope,
                                          AccessTokenSpec accessTokenSpec,
                                          ClaimsSpec claimsSpec,
                                          @Nullable net.minidev.json.JSONObject data)
        Creates a new token exchange authorisation specifying the issue of an own (local) access token.
        Parameters:
        subject - The subject (end-user) identifier. Must not be null.
        scope - The authorised scope. Must not be null.
        accessTokenSpec - The access token specification. Must not be null.
        claimsSpec - The OpenID claims specification. Must not be null.
        data - Additional data as a JSON object, null if not specified.
    • Method Detail

      • getTokenType

        public com.nimbusds.oauth2.sdk.token.TokenTypeURI getTokenType()
        Returns the type of the issued token.
        Returns:
        The type of the issued token.
      • getSubject

        public com.nimbusds.oauth2.sdk.id.Subject getSubject()
        Returns the subject (end-user) identifier.
        Returns:
        The subject identifier.
      • parse

        public static TokenExchangeAuthorization parse​(net.minidev.json.JSONObject jsonObject)
                                                throws com.nimbusds.oauth2.sdk.ParseException
        Parses a token exchange authorisation from the specified JSON object.
        Parameters:
        jsonObject - The JSON object to parse. Must not be null.
        Returns:
        The token exchange authorisation.
        Throws:
        com.nimbusds.oauth2.sdk.ParseException - If parsing failed.
      • parse

        public static TokenExchangeAuthorization parse​(String json)
                                                throws com.nimbusds.oauth2.sdk.ParseException
        Parses a token exchange authorisation from the specified JSON object string.
        Parameters:
        json - The JSON object string to parse. Must not be null.
        Returns:
        The token exchange authorisation.
        Throws:
        com.nimbusds.oauth2.sdk.ParseException - If parsing failed.