ExecutableResponse

ExecutableResponse

Defines the response of a 3rd party executable run by the pluggable auth client.

Constructor

new ExecutableResponse(responseJson)

Instantiates an ExecutableResponse instance using the provided JSON object from the output of the executable.

Parameters:
Name Type Description
responseJson

Response from a 3rd party executable, loaded from a run of the executable or a cached output file.

Members

errorCode

The error code from the executable.

errorMessage

The error message from the executable.

expirationTime

The epoch time for expiration of the token in seconds.

subjectToken

The subject token from the executable, format depends on tokenType.

success

Whether the executable ran successfully.

tokenType

The type of subject token in the response, currently supported values are: urn:ietf:params:oauth:token-type:saml2 urn:ietf:params:oauth:token-type:id_token urn:ietf:params:oauth:token-type:jwt

version

The version of the Executable response. Only version 1 is currently supported.

Methods

isExpired()

Returns:
Type Description

A boolean representing if the response is expired. Returns true if the provided timeout has passed.

isValid()

Returns:
Type Description

A boolean representing if the response has a valid token. Returns true when the response was successful and the token is not expired.