post-challenge
Actions trigger includes:
api.access
api.access.deny(reason)
api
object.
Parameter | Description |
---|---|
reason | String. A human-readable explanation for rejecting the login. This may be presented directly in end-user interfaces. |
api.authentication
api.authentication.challengeWith(factor, [options])
additionalFactors
.additionalFactors
are supplied, the user can choose to authenticate with a different factor than the default challenge.
Parameter | Description |
---|---|
factor | FactorSelector. An object describing the type of factor (and its options) that should be used for the initial challenge. |
options | Optional Object. Additional options that can also specify |
api.authentication.challengeWithAny([factors])
api.authentication.challengeWith()
method is preferred.
Parameter | Description |
---|---|
factor | FactorSelector[]. An array of factors. |
api.cache
api.cache.delete(key)
CacheWriteResult
object with type: "success"
if a value was removed from the cache. A failed operation returns type: "error"
.
For errors, the returned object includes a code
property that indicates the nature of the failure.
Parameter | Description |
---|---|
key | String. The key of the record stored in the cache. |
api.cache.get(key)
key
, if it exists. If a record is found, the cached value can
be found at the value
property of the returned object.
Returns a cache record if an item is found in the cache for the supplied
key
. Cache records are objects containing the following properties:
value
The cached valueexpires_at
The maximum expiry of the record in milliseconds since the Unix epochParameter | Description |
---|---|
key | String. The key of the record stored in the cache. |
api.cache.set(key, value, [options])
ttl
or expires_at
values. If no lifetime is
specified, a default of lifetime of 15 minutes is used. Lifetimes cannot exceed the maximum duration listed in the
Actions Cache Limits.
Parameter | Description |
---|---|
key | String. The key of the record stored in the cache. |
value | String. The value of the record to be stored. |
options | Optional object. Options for adjusting cache behavior. |
options.expires_at | Optional number. The absolute expiry time in milliseconds
since the Unix epoch. While cached records may be evicted earlier, they will never remain beyond the the supplied Note: This value should not be supplied if |
options.ttl | Optional number. The time-to-live value of this cache entry
in milliseconds. While cached values may be evicted earlier, they will never remain beyond the the supplied Note: This value should not be supplied if a |
api.redirect
api.redirect.encodeToken(options)
sendUserTo
) and contains data whose authenticity must be provable by the target endpoint. The target endpoint
can verify the authenticity and integrity of the data by checking the
JWT’s signature using a shared secret.
Returns a JWT string.
Parameter | Description |
---|---|
options | Options. Configure how sensitive data is encoded into the query parameters of the resulting url. |
options.expiresInSeconds | Number. Number of seconds before the token expires. Default is 900. |
options.payload | Options. The data intended to be passed to the target of the redirect and whose authenticity and integrity must be provable. |
options.secret | String. A secret that will be used to sign a JWT shared with the redirect target. This value should be stored
as a secret and retrieved using
|
api.redirect.sendUserTo(url, options)
url
immediately after the
action completes.
Returns a reference to the api
object.
Parameter | Description |
---|---|
url | String. The target URL of the redirect. |
options | Options. An object representing any additional query string parameters appended to the redirect URL. |
options.query | Options. Additional query string parameters to append to the redirect URL. |
api.redirect.validateToken(options)
/continue
endpoint while simultaneously verifying the authenticity and integrity of that data.
Returns payload of the JWT token.
Parameter | Description |
---|---|
options | Options. Options for retrieving the data encoded in a JWT
token passed to the |
options.secret | String. Secret used to encode the token. |
options.tokenParameterName | String. The name of the query or body parameter that was
sent to the |
api.transaction
api.transaction.setResultUrl(url, options)
url
after the user resets their password.
Parameter | Description |
---|---|
url | String. The URL a user is directed to after updating their password. Ensure this URL is validated and safe for end users. |
options | Options. An object representing any additional query string parameters appended to the target URL. |
options.query | Options. Additional query string parameters to append to the target URL. |