Class BaseTokenIntrospectionResponseComposer

    • Method Detail

      • compose

        public com.nimbusds.oauth2.sdk.TokenIntrospectionSuccessResponse compose​(AccessTokenAuthorization tokenAuthz,
                                                                                 TokenIntrospectionContext context)
        Description copied from interface: TokenIntrospectionResponseComposer
        Composes a token introspection response.

        If the access token was found to be invalid or expired the method should simply return

         if (tokenAuthz == null) {
                return new TokenIntrospectionSuccessResponse.Builder(false)
                    .build();
         }
         
        Specified by:
        compose in interface TokenIntrospectionResponseComposer
        Parameters:
        tokenAuthz - The access token authorisation, null if the token was found to be invalid or expired (implies "active":false).
        context - The token introspection context. Not null.
        Returns:
        The token introspection success response (for "active":true as well as "active":false access tokens.