Context for OAuth 2.0 Token Exchange on the token endpoint

Hierarchy

Properties

actorTokenType: null | string

Returns

the actor token type received on the endpoint. This must be one of the standard values according to the specification.

This method return null if no actor token was presented to the server.

authenticationAttributes: null | AuthenticationAttributes

Returns

the a map of the AuthenticationAttributes retrieved from the subject token if it was introspected by the server. Otherwise, it returns null.

Returns

the client that made the request.

json: Json

Get the JSON helper for serializing/de-serializing JavaScript and Java types.

presentedActorTokenDelegation: null | ScriptDelegation

Returns

the actor token delegation found when introspecting the actor token. This method return null if no actor token was presented to the server.

presentedSubjectToken: null | object

Returns

the introspected subject token if that token could be introspected by the server. If it returns null the procedure plugin is expected to introspect the token itself by retrieving the raw token using context.getSubjectTokenValue() after performing the necessary operations to retrieve token details

presentedSubjectTokenDelegation: null | ScriptDelegation

Returns

the delegation for the subject token if the token was possible to introspect by the server. In other cases it returns null.

request: ScriptRequest

The original request object. This can be used to access headers and parameters passed in the original request.

requestedAudiences: any[]

Returns

the requested audiences as a set of strings.

This method returns an empty set if no audiences were requested.

requestedScopes: any[]

Returns

the requested scopes as a set of strings.

This method returns an empty set if no scopes were requested .

requestedTokenType: null | string

Returns

the requested token type received on the endpoint. This may be one of the standard values according to the specification or a custom value. If not present it is up to the procedure plugin to decide the return type of the token.

This method return {@code null} if no requested token type was presented to the server.

response: ScriptResponse

The Response object. Can be used to modify cookies in the response.

subjectTokenType: string

Returns

the subject token type received on the endpoint. This may be a standard value or a custom value.

subjectTokenValue: string

Returns

the subject token value received on the endpoint. This can be used to introspect the subject token in cases where it was not issued by the server.

tokenProcedureContextName: string

Returns

a string that describes the type of this token procedure context.

Methods

  • Returns

    the a map of the ContextAttributes retrieved from the subject token if it was introspected by the server. Otherwise, it returns null.

    Returns null | object

  • Returns

    the actor token type received on the endpoint. This must be one of the standard values according to the specification.

    This method return null if no actor token was presented to the server.

    Returns null | string

  • Returns

    the a map of the AuthenticationAttributes retrieved from the subject token if it was introspected by the server. Otherwise, it returns null.

    Returns null | AuthenticationAttributes

  • Returns

    a new fully initialized context. This method is used to get a fully initialized context. Before this is called it is not possible to use token issuers on the context or from the configuration object. It MUST be called before issuing tokens.

    If the subject token was introspected by the server already this method can be called the following way: context.getInitializedContext(context.subjectAttributes(), context.contextAttributes(), ...);

    Parameters

    • subjectAttributes: object
    • contextAttributes: null | object
    • audienceOfPresentedToken: any[]
    • scopes: any[]

    Returns OAuthTokenExchangeProcedureContext

  • Returns

    the introspected actor token if it was presented to the server. When the actor token is presented to the server it is expected to have been issued by the server, thus if introspection fails the endpoint will return an error to the client.

    The validationStrategy parameter can either be NONE or CLIENT, null defaults to CLIENT. NONE means no additional checks are made, and CLIENT means that the actor token MUST belong to the client that made the exchange request.

    This method return null if no actor token was presented to the server.

    Parameters

    • validationStrategy: null | string

    Returns null | object

  • Returns

    the actor token delegation found when introspecting the actor token. This method return null if no actor token was presented to the server.

    Returns null | ScriptDelegation

  • Returns

    the introspected subject token if that token could be introspected by the server. If it returns null the procedure plugin is expected to introspect the token itself by retrieving the raw token using context.getSubjectTokenValue() after performing the necessary operations to retrieve token details

    Returns null | object

  • Returns

    the delegation for the subject token if the token was possible to introspect by the server. In other cases it returns null.

    Returns null | ScriptDelegation

  • Returns

    the requested audiences as a set of strings.

    This method returns an empty set if no audiences were requested.

    Returns any[]

  • Returns

    the requested scopes as a set of strings.

    This method returns an empty set if no scopes were requested .

    Returns any[]

  • Returns

    the requested token type received on the endpoint. This may be one of the standard values according to the specification or a custom value. If not present it is up to the procedure plugin to decide the return type of the token.

    This method return {@code null} if no requested token type was presented to the server.

    Returns null | string

  • Returns

    the subject token type received on the endpoint. This may be a standard value or a custom value.

    Returns string

  • Returns

    the subject token value received on the endpoint. This can be used to introspect the subject token in cases where it was not issued by the server.

    Returns string

  • Returns

    the a map of the SubjectAttributes retrieved from the subject token if it was introspected by the server. Otherwise, it returns null.

    Returns null | object