Interface Actions

All Known Subinterfaces:
AuthenticationStepConfigurator, ConsentorStepConfigurator, RegistrationStepConfigurator, SelectorActionConfigurator, SuccessContinuationActions

public interface Actions
Builder interface allowing the addition of actions to the representation being built.

A action represents something the client application can perform to advance the authentication process, eventually after interacting with the application user.

Since:
5.4.0
  • Field Details

    • EMPTY_CONSUMER

      static final Consumer<Object> EMPTY_CONSUMER
      An empty consumer.
  • Method Details

    • addFormAction

      void addFormAction(ActionKind kind, URI href, HttpMethod method, @Nullable MediaType type, @Nullable Message title, @Nullable Message actionTitle, Consumer<? super FormActionConfigurator> builder)
      Adds a form action, which is a action that may collect information from the user and then use it to make an HTTP request to the API.

      Plays a role similar to HTML forms.

      Parameters:
      kind - the action kind.
      href - the HTTP target URI.
      method - the HTTP method.
      type - the identifier of the media type to use in the request payload.
      title - the action title.
      actionTitle - the action submit title.
      builder - a builder to add fields to the form.
    • addFormAction

      default void addFormAction(ActionKind kind, URI href, @Nullable Message title)
      Adds a form action that does not collect information from the user.

      The action will use the GET HTTP method.

      Plays a role similar to HTML links.

      Parameters:
      kind - the action kind.
      href - the HTTP target URI.
      title - the action title.
    • addFormAction

      default void addFormAction(ActionKind kind, URI href, HttpMethod method, @Nullable MediaType type, @Nullable Message title, Consumer<? super FormActionConfigurator> builder)
      Adds a form action, which is a action that may collect information from the user and then use it to make an HTTP request to the API. Plays a role similar to HTML forms.
      Parameters:
      kind - the action kind.
      href - the HTTP target URI.
      method - the HTTP method.
      type - the identifier of the media type to use in the request payload.
      builder - a builder to add fields to the form.
    • addFormAction

      default void addFormAction(ActionKind kind, URI href, HttpMethod method, @Nullable MediaType type, @Nullable Message title, @Nullable Message actionTitle)
      Adds a form action that does not collect information from the user.

      Plays a role similar to HTML links.

      Parameters:
      kind - the action kind.
      href - the HTTP target URI.
      method - the HTTP method.
      type - the identifier of the media type to use in the request payload.
      title - the action title.
      actionTitle - the action submit title.
    • addFormAction

      default void addFormAction(ActionKind kind, URI href, HttpMethod method, @Nullable Message title)
      Adds a form action that does not collect information from the user.

      Plays a role similar to HTML links.

      Parameters:
      kind - the action kind.
      href - the HTTP target URI.
      method - the HTTP method.
      title - the action title.
    • addSelectorAction

      void addSelectorAction(ActionKind kind, Message title, Consumer<? super SelectorActionConfigurator> builder)
      Adds a selector action, which allows the user to select one of multiple options.
      Parameters:
      kind - the action kind.
      title - the selector title.
      builder - a builder allowing the addition of the action content, namely its options.
    • addClientOperationAction

      void addClientOperationAction(ActionKind kind, OperationName name, @Nullable Message title, Consumer<? super ClientOperationActionConfigurator> builder)
      Adds a client operation action, which instructs the client to perform the operation identified by name.

      Clients must know which steps are needed to perform specific operations, which may include launching an external application, opening a browser window or interacting with platform-specific APIs. Operations may require parameters, which can be added to the action representation.

      A client operation action should include continuation actions, allowing the client to continue the authentication process after the operation is completed.

      Parameters:
      kind - the action kind.
      name - the operation name.
      title - the action title.
      builder - a builder allowing the addition of the action content, namely the operation parameters.
      Since:
      6.0.0