Class IdTokenResponse

  • All Implemented Interfaces:
    Cloneable, Map<String,​Object>

    @Beta
    public class IdTokenResponse
    extends TokenResponse
    Beta
    OAuth ID Connect JSON model for a successful access token response as specified in OpenID Connect Basic Client Profile 1.0 (draft 23).

    Implementation is not thread-safe. Sample usage:

      static JsonWebSignature executeIdToken(TokenRequest tokenRequest) throws IOException {
        IdTokenResponse idTokenResponse = IdTokenResponse.execute(tokenRequest);
        return idTokenResponse.parseIdToken();
      }
     
    Since:
    1.7
    Author:
    Yaniv Inbar
    • Constructor Detail

      • IdTokenResponse

        public IdTokenResponse()
    • Method Detail

      • getIdToken

        public final String getIdToken()
        Returns the ID token.
      • setIdToken

        public IdTokenResponse setIdToken​(String idToken)
        Sets the ID token.

        Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

      • setAccessToken

        public IdTokenResponse setAccessToken​(String accessToken)
        Description copied from class: TokenResponse
        Sets the access token issued by the authorization server.

        Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

        Overrides:
        setAccessToken in class TokenResponse
      • setExpiresInSeconds

        public IdTokenResponse setExpiresInSeconds​(Long expiresIn)
        Description copied from class: TokenResponse
        Sets the lifetime in seconds of the access token (for example 3600 for an hour) or null for none.

        Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

        Overrides:
        setExpiresInSeconds in class TokenResponse
      • setRefreshToken

        public IdTokenResponse setRefreshToken​(String refreshToken)
        Description copied from class: TokenResponse
        Sets the refresh token which can be used to obtain new access tokens using the same authorization grant or null for none.

        Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

        Overrides:
        setRefreshToken in class TokenResponse
      • setScope

        public IdTokenResponse setScope​(String scope)
        Description copied from class: TokenResponse
        Sets the scope of the access token or null for none.

        Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

        Overrides:
        setScope in class TokenResponse