Interface ClientCredentialsGrantHandler

    • Field Detail

      • GRANT_TYPE

        static final com.nimbusds.oauth2.sdk.GrantType GRANT_TYPE
        The handled grant type.
    • Method Detail

      • processGrant

        @Deprecated
        default GrantAuthorization processGrant​(@Nullable com.nimbusds.oauth2.sdk.Scope scope,
                                                com.nimbusds.oauth2.sdk.id.ClientID clientID,
                                                com.nimbusds.oauth2.sdk.client.ClientMetadata clientMetadata)
                                         throws com.nimbusds.oauth2.sdk.GeneralException
        Deprecated.
        Handles a client credentials grant. The client is confidential and always authenticated.
        Parameters:
        scope - The requested scope, null if not specified.
        clientID - The client identifier. Not null.
        clientMetadata - The OAuth 2.0 client metadata. Not null.

        If the requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner the handler must throw a GeneralException with an invalid_scope error code.

        Returns:
        The authorisation.
        Throws:
        com.nimbusds.oauth2.sdk.GeneralException - If the grant is invalid, or another exception was encountered.
      • processGrant

        default GrantAuthorization processGrant​(TokenRequestParameters tokenRequestParams,
                                                com.nimbusds.oauth2.sdk.id.ClientID clientID,
                                                com.nimbusds.oauth2.sdk.client.ClientMetadata clientMetadata,
                                                InvocationContext invocationCtx)
                                         throws com.nimbusds.oauth2.sdk.GeneralException
        Handles a client credentials grant. The client is confidential and always authenticated.
        Parameters:
        tokenRequestParams - The token request parameters, such as the requested scope. Not null.
        clientID - The client identifier. Not null.
        clientMetadata - The OAuth 2.0 client metadata. Not null.
        invocationCtx - The invocation context. Not null.

        If the requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner the handler must throw a GeneralException with an invalid_scope error code.

        Returns:
        The authorisation.
        Throws:
        com.nimbusds.oauth2.sdk.GeneralException - If the grant is invalid, or another exception was encountered.