org.keycloak.services.resources.admin

## Class AuthenticationManagementResource

- java.lang.Object
- - org.keycloak.services.resources.admin.AuthenticationManagementResource

-     public class AuthenticationManagementResource
      extends Object

  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthenticationManagementResource(RealmModel realm, KeycloakSession session, RealmAuth auth, AdminEventBuilder adminEvent)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `addExecution(AuthenticationExecutionRepresentation execution)` Add new authentication execution
    `void` | `addExecution(String flowAlias, Map<String,String> data)` Add new authentication execution to a flow
    `void` | `addExecutionFlow(String flowAlias, Map<String,String> data)` Add new flow with new execution to existing flow
    `List<Map<String,Object>>` | `buildProviderMetadata(List<ProviderFactory> factories)`
    `protected void` | `copy(String newName, AuthenticationFlowModel from, AuthenticationFlowModel to)`
    `javax.ws.rs.core.Response` | `copy(String flowAlias, Map<String,String> data)` Copy existing authentication flow under a new name The new name is given as 'newName' attribute of the passed JSON object
    `javax.ws.rs.core.Response` | `createAuthenticatorConfig(AuthenticatorConfigRepresentation rep)` Deprecated. Use `newExecutionConfig(String, AuthenticatorConfigRepresentation)` instead
    `javax.ws.rs.core.Response` | `createFlow(AuthenticationFlowRepresentation flow)` Create a new authentication flow
    `void` | `deleteFlow(String id)` Delete an authentication flow
    `AuthenticatorConfigRepresentation` | `getAuthenticatorConfig(String id)` Get authenticator configuration
    `AuthenticatorConfigRepresentation` | `getAuthenticatorConfig(String execution, String id)` Deprecated. Use rather `getAuthenticatorConfig(String)`
    `AuthenticatorConfigInfoRepresentation` | `getAuthenticatorConfigDescription(String providerId)` Get authenticator provider's configuration description
    `List<Map<String,Object>>` | `getAuthenticatorProviders()` Get authenticator providers Returns a list of authenticator providers.
    `List<Map<String,Object>>` | `getClientAuthenticatorProviders()` Get client authenticator providers Returns a list of client authenticator providers.
    `javax.ws.rs.core.Response` | `getExecutions(String flowAlias)` Get authentication executions for a flow
    `AuthenticationFlowRepresentation` | `getFlow(String id)` Get authentication flow for id
    `List<AuthenticationFlowRepresentation>` | `getFlows()` Get authentication flows Returns a list of authentication flows.
    `List<Map<String,Object>>` | `getFormActionProviders()` Get form action providers Returns a list of form action providers.
    `List<Map<String,Object>>` | `getFormProviders()` Get form providers Returns a list of form providers.
    `AuthenticationFlowModel` | `getParentFlow(AuthenticationExecutionModel model)`
    `Map<String,List<ConfigPropertyRepresentation>>` | `getPerClientConfigDescription()` Get configuration descriptions for all clients
    `RequiredActionProviderRepresentation` | `getRequiredAction(String alias)` Get required action for alias
    `List<RequiredActionProviderRepresentation>` | `getRequiredActions()` Get required actions Returns a list of required actions.
    `List<AuthenticationExecutionModel>` | `getSortedExecutions(AuthenticationFlowModel parentFlow)`
    `List<Map<String,String>>` | `getUnregisteredRequiredActions()` Get unregistered required actions Returns a list of unregistered required actions.
    `void` | `lowerPriority(String execution)` Lower execution's priority
    `javax.ws.rs.core.Response` | `newExecutionConfig(String execution, AuthenticatorConfigRepresentation json)` Update execution with new configuration
    `void` | `raisePriority(String execution)` Raise execution's priority
    `void` | `recurseExecutions(AuthenticationFlowModel flow, List<AuthenticationExecutionInfoRepresentation> result, int level)`
    `void` | `registerRequiredAction(Map<String,String> data)` Register a new required actions
    `void` | `removeAuthenticatorConfig(String id)` Delete authenticator configuration
    `void` | `removeExecution(String execution)` Delete execution
    `void` | `removeRequiredAction(String alias)` Delete required action
    `static RequiredActionProviderRepresentation` | `toRepresentation(RequiredActionProviderModel model)`
    `void` | `updateAuthenticatorConfig(String id, AuthenticatorConfigRepresentation rep)` Update authenticator configuration
    `void` | `updateExecutions(String flowAlias, AuthenticationExecutionInfoRepresentation rep)` Update authentication executions of a flow
    `void` | `updateRequiredAction(String alias, RequiredActionProviderRepresentation rep)` Update required action

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

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

- - ### Constructor Detail

    - #### AuthenticationManagementResource

          public AuthenticationManagementResource(RealmModel realm,
                                                  KeycloakSession session,
                                                  RealmAuth auth,
                                                  AdminEventBuilder adminEvent)

  - ### Method Detail

    - #### getFormProviders

          @Path(value="/form-providers")
           @GET
           @Produces(value="application/json")
          public List<Map<String,Object>> getFormProviders()

      Get form providers Returns a list of form providers.

    - #### getAuthenticatorProviders

          @Path(value="/authenticator-providers")
           @GET
           @Produces(value="application/json")
          public List<Map<String,Object>> getAuthenticatorProviders()

      Get authenticator providers Returns a list of authenticator providers.

    - #### getClientAuthenticatorProviders

          @Path(value="/client-authenticator-providers")
           @GET
           @Produces(value="application/json")
          public List<Map<String,Object>> getClientAuthenticatorProviders()

      Get client authenticator providers Returns a list of client authenticator providers.

    - #### buildProviderMetadata

          public List<Map<String,Object>> buildProviderMetadata(List<ProviderFactory> factories)

    - #### getFormActionProviders

          @Path(value="/form-action-providers")
           @GET
           @Produces(value="application/json")
          public List<Map<String,Object>> getFormActionProviders()

      Get form action providers Returns a list of form action providers.

    - #### getFlows

          @Path(value="/flows")
           @GET
           @Produces(value="application/json")
          public List<AuthenticationFlowRepresentation> getFlows()

      Get authentication flows Returns a list of authentication flows.

    - #### createFlow

          @Path(value="/flows")
           @POST
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response createFlow(AuthenticationFlowRepresentation flow)

      Create a new authentication flow
      Parameters:
        `flow` - Authentication flow representation
      Returns:

    - #### getFlow

          @Path(value="/flows/{id}")
           @GET
           @Produces(value="application/json")
          public AuthenticationFlowRepresentation getFlow(@PathParam(value="id")
                                                                                                                                String id)

      Get authentication flow for id
      Parameters:
        `id` - Flow id
      Returns:

    - #### deleteFlow

          @Path(value="/flows/{id}")
           @DELETE
          public void deleteFlow(@PathParam(value="id")
                                                                     String id)

      Delete an authentication flow
      Parameters:
        `id` - Flow id

    - #### copy

          @Path(value="/flows/{flowAlias}/copy")
           @POST
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response copy(@PathParam(value="flowAlias")
                                                                                                                                   String flowAlias,
                                                                                                                                   Map<String,String> data)

      Copy existing authentication flow under a new name The new name is given as 'newName' attribute of the passed JSON object
      Parameters:
        `flowAlias` - Name of the existing authentication flow
        `data` - JSON containing 'newName' attribute

    - #### copy

          protected void copy(String newName,
                              AuthenticationFlowModel from,
                              AuthenticationFlowModel to)

    - #### addExecutionFlow

          @Path(value="/flows/{flowAlias}/executions/flow")
           @POST
           @Consumes(value="application/json")
          public void addExecutionFlow(@PathParam(value="flowAlias")
                                                                                                                                     String flowAlias,
                                                                                                                                     Map<String,String> data)

      Add new flow with new execution to existing flow
      Parameters:
        `flowAlias` - Alias of parent authentication flow
        `data` - New authentication flow / execution JSON data containing 'alias', 'type', 'provider', and 'description' attributes

    - #### addExecution

          @Path(value="/flows/{flowAlias}/executions/execution")
           @POST
           @Consumes(value="application/json")
          public void addExecution(@PathParam(value="flowAlias")
                                                                                                                                      String flowAlias,
                                                                                                                                      Map<String,String> data)

      Add new authentication execution to a flow
      Parameters:
        `flowAlias` - Alias of parent flow
        `data` - New execution JSON data containing 'provider' attribute

    - #### getExecutions

          @Path(value="/flows/{flowAlias}/executions")
           @GET
           @Produces(value="application/json")
          public javax.ws.rs.core.Response getExecutions(@PathParam(value="flowAlias")
                                                                                                                                                 String flowAlias)

      Get authentication executions for a flow
      Parameters:
        `flowAlias` - Flow alias

    - #### recurseExecutions

          public void recurseExecutions(AuthenticationFlowModel flow,
                                        List<AuthenticationExecutionInfoRepresentation> result,
                                        int level)

    - #### updateExecutions

          @Path(value="/flows/{flowAlias}/executions")
           @PUT
           @Consumes(value="application/json")
          public void updateExecutions(@PathParam(value="flowAlias")
                                                                                                                               String flowAlias,
                                                                                                                               AuthenticationExecutionInfoRepresentation rep)

      Update authentication executions of a flow
      Parameters:
        `flowAlias` - Flow alias
        `rep` -

    - #### addExecution

          @Path(value="/executions")
           @POST
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response addExecution(AuthenticationExecutionRepresentation execution)

      Add new authentication execution
      Parameters:
        `execution` - JSON model describing authentication execution

    - #### getParentFlow

          public AuthenticationFlowModel getParentFlow(AuthenticationExecutionModel model)

    - #### raisePriority

          @Path(value="/executions/{executionId}/raise-priority")
           @POST
          public void raisePriority(@PathParam(value="executionId")
                                                                                                   String execution)

      Raise execution's priority
      Parameters:
        `execution` - Execution id

    - #### getSortedExecutions

          public List<AuthenticationExecutionModel> getSortedExecutions(AuthenticationFlowModel parentFlow)

    - #### lowerPriority

          @Path(value="/executions/{executionId}/lower-priority")
           @POST
          public void lowerPriority(@PathParam(value="executionId")
                                                                                                   String execution)

      Lower execution's priority
      Parameters:
        `execution` - Execution id

    - #### removeExecution

          @Path(value="/executions/{executionId}")
           @DELETE
          public void removeExecution(@PathParam(value="executionId")
                                                                                        String execution)

      Delete execution
      Parameters:
        `execution` - Execution id

    - #### newExecutionConfig

          @Path(value="/executions/{executionId}/config")
           @POST
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response newExecutionConfig(@PathParam(value="executionId")
                                                                                                                                                          String execution,
                                                                                                                                                          AuthenticatorConfigRepresentation json)

      Update execution with new configuration
      Parameters:
        `execution` - Execution id
        `json` - JSON with new configuration
      Returns:

    - #### getAuthenticatorConfig

          @Path(value="/executions/{executionId}/config/{id}")
           @GET
           @Produces(value="application/json")
          public AuthenticatorConfigRepresentation getAuthenticatorConfig(@PathParam(value="executionId")
                                                                                                                                                                          String execution,
                                                                                                                                                                          @PathParam(value="id")
                                                                                                                                                                          String id)

      Deprecated. Use rather `getAuthenticatorConfig(String)`
      Get execution's configuration
      Parameters:
        `execution` - Execution id
        `id` - Configuration id

    - #### getUnregisteredRequiredActions

          @Path(value="unregistered-required-actions")
           @GET
           @Produces(value="application/json")
          public List<Map<String,String>> getUnregisteredRequiredActions()

      Get unregistered required actions Returns a list of unregistered required actions.

    - #### registerRequiredAction

          @Path(value="register-required-action")
           @POST
           @Consumes(value="application/json")
          public void registerRequiredAction(Map<String,String> data)

      Register a new required actions
      Parameters:
        `data` - JSON containing 'providerId', and 'name' attributes.

    - #### getRequiredActions

          @Path(value="required-actions")
           @GET
           @Produces(value="application/json")
          public List<RequiredActionProviderRepresentation> getRequiredActions()

      Get required actions Returns a list of required actions.

    - #### toRepresentation

          public static RequiredActionProviderRepresentation toRepresentation(RequiredActionProviderModel model)

    - #### getRequiredAction

          @Path(value="required-actions/{alias}")
           @GET
           @Produces(value="application/json")
          public RequiredActionProviderRepresentation getRequiredAction(@PathParam(value="alias")
                                                                                                                                                           String alias)

      Get required action for alias
      Parameters:
        `alias` - Alias of required action

    - #### updateRequiredAction

          @Path(value="required-actions/{alias}")
           @PUT
           @Consumes(value="application/json")
          public void updateRequiredAction(@PathParam(value="alias")
                                                                                                                              String alias,
                                                                                                                              RequiredActionProviderRepresentation rep)

      Update required action
      Parameters:
        `alias` - Alias of required action
        `rep` - JSON describing new state of required action

    - #### removeRequiredAction

          @Path(value="required-actions/{alias}")
           @DELETE
          public void removeRequiredAction(@PathParam(value="alias")
                                                                                            String alias)

      Delete required action
      Parameters:
        `alias` - Alias of required action

    - #### getAuthenticatorConfigDescription

          @Path(value="config-description/{providerId}")
           @GET
           @Produces(value="application/json")
          public AuthenticatorConfigInfoRepresentation getAuthenticatorConfigDescription(@PathParam(value="providerId")
                                                                                                                                                                                   String providerId)

      Get authenticator provider's configuration description

    - #### getPerClientConfigDescription

          @Path(value="per-client-config-description")
           @GET
           @Produces(value="application/json")
          public Map<String,List<ConfigPropertyRepresentation>> getPerClientConfigDescription()

      Get configuration descriptions for all clients

    - #### createAuthenticatorConfig

          @Path(value="config")
           @POST
          public javax.ws.rs.core.Response createAuthenticatorConfig(AuthenticatorConfigRepresentation rep)

      Deprecated. Use `newExecutionConfig(String, AuthenticatorConfigRepresentation)` instead
      Create new authenticator configuration
      Parameters:
        `rep` - JSON describing new authenticator configuration

    - #### getAuthenticatorConfig

          @Path(value="config/{id}")
           @GET
           @Produces(value="application/json")
          public AuthenticatorConfigRepresentation getAuthenticatorConfig(@PathParam(value="id")
                                                                                                                                                String id)

      Get authenticator configuration
      Parameters:
        `id` - Configuration id

    - #### removeAuthenticatorConfig

          @Path(value="config/{id}")
           @DELETE
          public void removeAuthenticatorConfig(@PathParam(value="id")
                                                                                    String id)

      Delete authenticator configuration
      Parameters:
        `id` - Configuration id

    - #### updateAuthenticatorConfig

          @Path(value="config/{id}")
           @PUT
           @Consumes(value="application/json")
          public void updateAuthenticatorConfig(@PathParam(value="id")
                                                                                                                      String id,
                                                                                                                      AuthenticatorConfigRepresentation rep)

      Update authenticator configuration
      Parameters:
        `id` - Configuration id
        `rep` - JSON describing new state of authenticator configuration

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