Class AuthenticationManagementResource
- java.lang.Object
- 
- org.keycloak.services.resources.admin.AuthenticationManagementResource
 
- 
 public class AuthenticationManagementResource extends Object - Author:
- Bill Burke
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static org.jboss.logging.Loggerlogger
 - 
Constructor SummaryConstructors Constructor Description AuthenticationManagementResource(KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description javax.ws.rs.core.ResponseaddExecution(AuthenticationExecutionRepresentation execution)Add new authentication executionjavax.ws.rs.core.ResponseaddExecutionFlow(String flowAlias, Map<String,String> data)Add new flow with new execution to existing flowjavax.ws.rs.core.ResponseaddExecutionToFlow(String flowAlias, Map<String,String> data)Add new authentication execution to a flowStream<Map<String,Object>>buildProviderMetadata(Stream<ProviderFactory> factories)javax.ws.rs.core.Responsecopy(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 objectstatic voidcopy(RealmModel realm, String newName, AuthenticationFlowModel from, AuthenticationFlowModel to)static AuthenticationFlowModelcopyFlow(RealmModel realm, AuthenticationFlowModel flow, String newName)javax.ws.rs.core.ResponsecreateAuthenticatorConfig(AuthenticatorConfigRepresentation rep)Deprecated.javax.ws.rs.core.ResponsecreateFlow(AuthenticationFlowRepresentation flow)Create a new authentication flowvoiddeleteFlow(String id)Delete an authentication flowAuthenticatorConfigRepresentationgetAuthenticatorConfig(String id)Get authenticator configurationAuthenticatorConfigRepresentationgetAuthenticatorConfig(String execution, String id)Deprecated.Use rathergetAuthenticatorConfig(String)AuthenticatorConfigInfoRepresentationgetAuthenticatorConfigDescription(String providerId)Get authenticator provider's configuration descriptionStream<Map<String,Object>>getAuthenticatorProviders()Get authenticator providers Returns a stream of authenticator providers.Stream<Map<String,Object>>getClientAuthenticatorProviders()Get client authenticator providers Returns a stream of client authenticator providers.javax.ws.rs.core.ResponsegetExecution(String executionId)Get Single Executionjavax.ws.rs.core.ResponsegetExecutions(String flowAlias)Get authentication executions for a flowAuthenticationFlowRepresentationgetFlow(String id)Get authentication flow for idStream<AuthenticationFlowRepresentation>getFlows()Get authentication flows Returns a stream of authentication flows.Stream<Map<String,Object>>getFormActionProviders()Get form action providers Returns a stream of form action providers.Stream<Map<String,Object>>getFormProviders()Get form providers Returns a stream of form providers.AuthenticationFlowModelgetParentFlow(AuthenticationExecutionModel model)Map<String,List<ConfigPropertyRepresentation>>getPerClientConfigDescription()Get configuration descriptions for all clientsRequiredActionProviderRepresentationgetRequiredAction(String alias)Get required action for aliasStream<RequiredActionProviderRepresentation>getRequiredActions()Get required actions Returns a stream of required actions.Stream<Map<String,String>>getUnregisteredRequiredActions()Get unregistered required actions Returns a stream of unregistered required actions.voidlowerPriority(String execution)Lower execution's priorityvoidlowerRequiredActionPriority(String alias)Lower required action's priorityjavax.ws.rs.core.ResponsenewExecutionConfig(String execution, AuthenticatorConfigRepresentation json)Update execution with new configurationvoidraisePriority(String execution)Raise execution's priorityvoidraiseRequiredActionPriority(String alias)Raise required action's priorityvoidrecurseExecutions(AuthenticationFlowModel flow, List<AuthenticationExecutionInfoRepresentation> result, int level)voidregisterRequiredAction(Map<String,String> data)Register a new required actionsvoidremoveAuthenticatorConfig(String id)Delete authenticator configurationvoidremoveExecution(String execution)Delete executionvoidremoveRequiredAction(String alias)Delete required actionstatic RequiredActionProviderRepresentationtoRepresentation(RequiredActionProviderModel model)voidupdateAuthenticatorConfig(String id, AuthenticatorConfigRepresentation rep)Update authenticator configurationjavax.ws.rs.core.ResponseupdateExecutions(String flowAlias, AuthenticationExecutionInfoRepresentation rep)Update authentication executions of a Flowjavax.ws.rs.core.ResponseupdateFlow(String id, AuthenticationFlowRepresentation flow)Update an authentication flowvoidupdateRequiredAction(String alias, RequiredActionProviderRepresentation rep)Update required action
 
- 
- 
- 
Constructor Detail- 
AuthenticationManagementResourcepublic AuthenticationManagementResource(KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent) 
 
- 
 - 
Method Detail- 
getFormProviders@Path("/form-providers") @GET @Produces("application/json") public Stream<Map<String,Object>> getFormProviders()Get form providers Returns a stream of form providers.
 - 
getAuthenticatorProviders@Path("/authenticator-providers") @GET @Produces("application/json") public Stream<Map<String,Object>> getAuthenticatorProviders()Get authenticator providers Returns a stream of authenticator providers.
 - 
getClientAuthenticatorProviders@Path("/client-authenticator-providers") @GET @Produces("application/json") public Stream<Map<String,Object>> getClientAuthenticatorProviders()Get client authenticator providers Returns a stream of client authenticator providers.
 - 
buildProviderMetadatapublic Stream<Map<String,Object>> buildProviderMetadata(Stream<ProviderFactory> factories) 
 - 
getFormActionProviders@Path("/form-action-providers") @GET @Produces("application/json") public Stream<Map<String,Object>> getFormActionProviders()Get form action providers Returns a stream of form action providers.
 - 
getFlows@Path("/flows") @GET @Produces("application/json") public Stream<AuthenticationFlowRepresentation> getFlows()Get authentication flows Returns a stream of authentication flows.
 - 
createFlow@Path("/flows") @POST @Consumes("application/json") public javax.ws.rs.core.Response createFlow(AuthenticationFlowRepresentation flow)Create a new authentication flow- Parameters:
- flow- Authentication flow representation
- Returns:
 
 - 
getFlow@Path("/flows/{id}") @GET @Produces("application/json") public AuthenticationFlowRepresentation getFlow(@PathParam("id") String id)Get authentication flow for id- Parameters:
- id- Flow id
- Returns:
 
 - 
updateFlow@Path("/flows/{id}") @PUT @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response updateFlow(@PathParam("id") String id, AuthenticationFlowRepresentation flow)Update an authentication flow- Parameters:
- flow- Authentication flow representation
- Returns:
 
 - 
deleteFlow@Path("/flows/{id}") @DELETE public void deleteFlow(@PathParam("id") String id)Delete an authentication flow- Parameters:
- id- Flow id
 
 - 
copy@Path("/flows/{flowAlias}/copy") @POST @Consumes("application/json") public javax.ws.rs.core.Response copy(@PathParam("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
 
 - 
copyFlowpublic static AuthenticationFlowModel copyFlow(RealmModel realm, AuthenticationFlowModel flow, String newName) 
 - 
copypublic static void copy(RealmModel realm, String newName, AuthenticationFlowModel from, AuthenticationFlowModel to) 
 - 
addExecutionFlow@Path("/flows/{flowAlias}/executions/flow") @POST @Consumes("application/json") public javax.ws.rs.core.Response addExecutionFlow(@PathParam("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
 
 - 
addExecutionToFlow@Path("/flows/{flowAlias}/executions/execution") @POST @Consumes("application/json") public javax.ws.rs.core.Response addExecutionToFlow(@PathParam("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("/flows/{flowAlias}/executions") @GET @Produces("application/json") public javax.ws.rs.core.Response getExecutions(@PathParam("flowAlias") String flowAlias)Get authentication executions for a flow- Parameters:
- flowAlias- Flow alias
 
 - 
recurseExecutionspublic void recurseExecutions(AuthenticationFlowModel flow, List<AuthenticationExecutionInfoRepresentation> result, int level) 
 - 
updateExecutions@Path("/flows/{flowAlias}/executions") @PUT @Produces("application/json") @Consumes("application/json") public javax.ws.rs.core.Response updateExecutions(@PathParam("flowAlias") String flowAlias, AuthenticationExecutionInfoRepresentation rep)Update authentication executions of a Flow- Parameters:
- flowAlias- Flow alias
- rep- AuthenticationExecutionInfoRepresentation
 
 - 
getExecution@Path("/executions/{executionId}") @GET @Produces("application/json") public javax.ws.rs.core.Response getExecution(@PathParam("executionId") String executionId)Get Single Execution
 - 
addExecution@Path("/executions") @POST @Consumes("application/json") public javax.ws.rs.core.Response addExecution(AuthenticationExecutionRepresentation execution)Add new authentication execution- Parameters:
- execution- JSON model describing authentication execution
 
 - 
getParentFlowpublic AuthenticationFlowModel getParentFlow(AuthenticationExecutionModel model) 
 - 
raisePriority@Path("/executions/{executionId}/raise-priority") @POST public void raisePriority(@PathParam("executionId") String execution)Raise execution's priority- Parameters:
- execution- Execution id
 
 - 
lowerPriority@Path("/executions/{executionId}/lower-priority") @POST public void lowerPriority(@PathParam("executionId") String execution)Lower execution's priority- Parameters:
- execution- Execution id
 
 - 
removeExecution@Path("/executions/{executionId}") @DELETE public void removeExecution(@PathParam("executionId") String execution)Delete execution- Parameters:
- execution- Execution id
 
 - 
newExecutionConfig@Path("/executions/{executionId}/config") @POST @Consumes("application/json") public javax.ws.rs.core.Response newExecutionConfig(@PathParam("executionId") String execution, AuthenticatorConfigRepresentation json)Update execution with new configuration- Parameters:
- execution- Execution id
- json- JSON with new configuration
- Returns:
 
 - 
getAuthenticatorConfig@Path("/executions/{executionId}/config/{id}") @GET @Produces("application/json") public AuthenticatorConfigRepresentation getAuthenticatorConfig(@PathParam("executionId") String execution, @PathParam("id") String id)Deprecated.Use rathergetAuthenticatorConfig(String)Get execution's configuration- Parameters:
- execution- Execution id
- id- Configuration id
 
 - 
getUnregisteredRequiredActions@Path("unregistered-required-actions") @GET @Produces("application/json") public Stream<Map<String,String>> getUnregisteredRequiredActions()Get unregistered required actions Returns a stream of unregistered required actions.
 - 
registerRequiredAction@Path("register-required-action") @POST @Consumes("application/json") public void registerRequiredAction(Map<String,String> data)Register a new required actions- Parameters:
- data- JSON containing 'providerId', and 'name' attributes.
 
 - 
getRequiredActions@Path("required-actions") @GET @Produces("application/json") public Stream<RequiredActionProviderRepresentation> getRequiredActions()Get required actions Returns a stream of required actions.
 - 
toRepresentationpublic static RequiredActionProviderRepresentation toRepresentation(RequiredActionProviderModel model) 
 - 
getRequiredAction@Path("required-actions/{alias}") @GET @Produces("application/json") public RequiredActionProviderRepresentation getRequiredAction(@PathParam("alias") String alias)Get required action for alias- Parameters:
- alias- Alias of required action
 
 - 
updateRequiredAction@Path("required-actions/{alias}") @PUT @Consumes("application/json") public void updateRequiredAction(@PathParam("alias") String alias, RequiredActionProviderRepresentation rep)Update required action- Parameters:
- alias- Alias of required action
- rep- JSON describing new state of required action
 
 - 
removeRequiredAction@Path("required-actions/{alias}") @DELETE public void removeRequiredAction(@PathParam("alias") String alias)Delete required action- Parameters:
- alias- Alias of required action
 
 - 
raiseRequiredActionPriority@Path("required-actions/{alias}/raise-priority") @POST public void raiseRequiredActionPriority(@PathParam("alias") String alias)Raise required action's priority- Parameters:
- alias- Alias of required action
 
 - 
lowerRequiredActionPriority@Path("/required-actions/{alias}/lower-priority") @POST public void lowerRequiredActionPriority(@PathParam("alias") String alias)Lower required action's priority- Parameters:
- alias- Alias of required action
 
 - 
getAuthenticatorConfigDescription@Path("config-description/{providerId}") @GET @Produces("application/json") public AuthenticatorConfigInfoRepresentation getAuthenticatorConfigDescription(@PathParam("providerId") String providerId)Get authenticator provider's configuration description
 - 
getPerClientConfigDescription@Path("per-client-config-description") @GET @Produces("application/json") public Map<String,List<ConfigPropertyRepresentation>> getPerClientConfigDescription()Get configuration descriptions for all clients
 - 
createAuthenticatorConfig@Path("config") @POST @Consumes("application/json") public javax.ws.rs.core.Response createAuthenticatorConfig(AuthenticatorConfigRepresentation rep)Deprecated.Create new authenticator configuration- Parameters:
- rep- JSON describing new authenticator configuration
 
 - 
getAuthenticatorConfig@Path("config/{id}") @GET @Produces("application/json") public AuthenticatorConfigRepresentation getAuthenticatorConfig(@PathParam("id") String id)Get authenticator configuration- Parameters:
- id- Configuration id
 
 - 
removeAuthenticatorConfig@Path("config/{id}") @DELETE public void removeAuthenticatorConfig(@PathParam("id") String id)Delete authenticator configuration- Parameters:
- id- Configuration id
 
 - 
updateAuthenticatorConfig@Path("config/{id}") @PUT @Consumes("application/json") public void updateAuthenticatorConfig(@PathParam("id") String id, AuthenticatorConfigRepresentation rep)Update authenticator configuration- Parameters:
- id- Configuration id
- rep- JSON describing new state of authenticator configuration
 
 
- 
 
-