org.keycloak.authentication.actiontoken.execactions

## Class ExecuteActionsActionTokenHandler

- java.lang.Object
- - org.keycloak.authentication.actiontoken.AbstractActionTokenHandler<ExecuteActionsActionToken>
  - - org.keycloak.authentication.actiontoken.execactions.ExecuteActionsActionTokenHandler

- All Implemented Interfaces:
    ActionTokenHandler<ExecuteActionsActionToken>, ActionTokenHandlerFactory<ExecuteActionsActionToken>, Provider, ProviderFactory<ActionTokenHandler<ExecuteActionsActionToken>>

      public class ExecuteActionsActionTokenHandler
      extends AbstractActionTokenHandler<ExecuteActionsActionToken>

  Author:
    hmlnarik

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExecuteActionsActionTokenHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canUseTokenRepeatedly(ExecuteActionsActionToken token, ActionTokenContext<ExecuteActionsActionToken> tokenContext)` Returns `true` when the token can be used repeatedly to invoke the action, `false` when the token is intended to be for single use only.
    `TokenVerifier.Predicate<? super ExecuteActionsActionToken>[]` | `getVerifiers(ActionTokenContext<ExecuteActionsActionToken> tokenContext)` Returns an array of verifiers that are tested prior to handling the token.
    `javax.ws.rs.core.Response` | `handleToken(ExecuteActionsActionToken token, ActionTokenContext<ExecuteActionsActionToken> tokenContext)` Performs the action as per the token details.

    - ### Methods inherited from class org.keycloak.authentication.actiontoken.AbstractActionTokenHandler

      `close, create, eventType, getAuthenticationSessionIdFromToken, getDefaultErrorMessage, getDefaultEventError, getId, getTokenClass, init, postInit, startFreshAuthenticationSession, verifyEmail`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.keycloak.provider.ProviderFactory

      `order`

- - ### Constructor Detail

    - #### ExecuteActionsActionTokenHandler

          public ExecuteActionsActionTokenHandler()

  - ### Method Detail

    - #### getVerifiers

          public TokenVerifier.Predicate<? super ExecuteActionsActionToken>[] getVerifiers(ActionTokenContext<ExecuteActionsActionToken> tokenContext)

      Description copied from interface: `ActionTokenHandler`
      Returns an array of verifiers that are tested prior to handling the token. All verifiers have to pass successfully for token to be handled. The returned array must not be `null`.
      Returns:
        Verifiers or an empty array. The returned array must not be `null`.

    - #### handleToken

          public javax.ws.rs.core.Response handleToken(ExecuteActionsActionToken token,
                                                       ActionTokenContext<ExecuteActionsActionToken> tokenContext)

      Description copied from interface: `ActionTokenHandler`
      Performs the action as per the token details. This method is only called if all verifiers returned in `ActionTokenHandler.handleToken(T, org.keycloak.authentication.actiontoken.ActionTokenContext<T>)` succeed.
      Returns:

    - #### canUseTokenRepeatedly

          public boolean canUseTokenRepeatedly(ExecuteActionsActionToken token,
                                               ActionTokenContext<ExecuteActionsActionToken> tokenContext)

      Description copied from interface: `ActionTokenHandler`
      Returns `true` when the token can be used repeatedly to invoke the action, `false` when the token is intended to be for single use only.
      Specified by:
        `canUseTokenRepeatedly` in interface `ActionTokenHandler<ExecuteActionsActionToken>`
      Overrides:
        `canUseTokenRepeatedly` in class `AbstractActionTokenHandler<ExecuteActionsActionToken>`
      Returns:
        see above

Copyright © 2021 JBoss by Red Hat. All rights reserved.