public class AuthenticationManagementResource extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.jboss.logging.Logger |
logger |
Constructor and Description |
---|
AuthenticationManagementResource(RealmModel realm,
KeycloakSession session,
AdminPermissionEvaluator auth,
AdminEventBuilder adminEvent) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addExecution(AuthenticationExecutionRepresentation execution)
Add new authentication execution
|
javax.ws.rs.core.Response |
addExecutionFlow(String flowAlias,
Map<String,String> data)
Add new flow with new execution to existing flow
|
javax.ws.rs.core.Response |
addExecutionToFlow(String flowAlias,
Map<String,String> data)
Add new authentication execution to a flow
|
Stream<Map<String,Object>> |
buildProviderMetadata(Stream<ProviderFactory> factories) |
static void |
copy(RealmModel realm,
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
|
static AuthenticationFlowModel |
copyFlow(RealmModel realm,
AuthenticationFlowModel flow,
String newName) |
javax.ws.rs.core.Response |
createAuthenticatorConfig(AuthenticatorConfigRepresentation rep)
Deprecated.
|
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
|
Stream<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.Response |
getExecution(String executionId)
Get Single Execution
|
javax.ws.rs.core.Response |
getExecutions(String flowAlias)
Get authentication executions for a flow
|
AuthenticationFlowRepresentation |
getFlow(String id)
Get authentication flow for id
|
Stream<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.
|
AuthenticationFlowModel |
getParentFlow(AuthenticationExecutionModel model) |
Map<String,List<ConfigPropertyRepresentation>> |
getPerClientConfigDescription()
Get configuration descriptions for all clients
|
RequiredActionProviderRepresentation |
getRequiredAction(String alias)
Get required action for alias
|
Stream<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.
|
void |
lowerPriority(String execution)
Lower execution's priority
|
void |
lowerRequiredActionPriority(String alias)
Lower required action'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 |
raiseRequiredActionPriority(String alias)
Raise required action'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
|
javax.ws.rs.core.Response |
updateExecutions(String flowAlias,
AuthenticationExecutionInfoRepresentation rep)
Update authentication executions of a Flow
|
javax.ws.rs.core.Response |
updateFlow(String id,
AuthenticationFlowRepresentation flow)
Update an authentication flow
|
void |
updateRequiredAction(String alias,
RequiredActionProviderRepresentation rep)
Update required action
|
public AuthenticationManagementResource(RealmModel realm, KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
@Path(value="/form-providers") @GET @Produces(value="application/json") public Stream<Map<String,Object>> getFormProviders()
@Path(value="/authenticator-providers") @GET @Produces(value="application/json") public Stream<Map<String,Object>> getAuthenticatorProviders()
@Path(value="/client-authenticator-providers") @GET @Produces(value="application/json") public Stream<Map<String,Object>> getClientAuthenticatorProviders()
public Stream<Map<String,Object>> buildProviderMetadata(Stream<ProviderFactory> factories)
@Path(value="/form-action-providers") @GET @Produces(value="application/json") public Stream<Map<String,Object>> getFormActionProviders()
@Path(value="/flows") @GET @Produces(value="application/json") public Stream<AuthenticationFlowRepresentation> getFlows()
@Path(value="/flows") @POST @Consumes(value="application/json") public javax.ws.rs.core.Response createFlow(AuthenticationFlowRepresentation flow)
flow
- Authentication flow representation@Path(value="/flows/{id}") @GET @Produces(value="application/json") public AuthenticationFlowRepresentation getFlow(@PathParam(value="id") String id)
id
- Flow id@Path(value="/flows/{id}") @PUT @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response updateFlow(@PathParam(value="id") String id, AuthenticationFlowRepresentation flow)
flow
- Authentication flow representation@Path(value="/flows/{id}") @DELETE public void deleteFlow(@PathParam(value="id") String id)
id
- Flow id@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)
flowAlias
- Name of the existing authentication flowdata
- JSON containing 'newName' attributepublic static AuthenticationFlowModel copyFlow(RealmModel realm, AuthenticationFlowModel flow, String newName)
public static void copy(RealmModel realm, String newName, AuthenticationFlowModel from, AuthenticationFlowModel to)
@Path(value="/flows/{flowAlias}/executions/flow") @POST @Consumes(value="application/json") public javax.ws.rs.core.Response addExecutionFlow(@PathParam(value="flowAlias") String flowAlias, Map<String,String> data)
flowAlias
- Alias of parent authentication flowdata
- New authentication flow / execution JSON data containing 'alias', 'type', 'provider', and 'description' attributes@Path(value="/flows/{flowAlias}/executions/execution") @POST @Consumes(value="application/json") public javax.ws.rs.core.Response addExecutionToFlow(@PathParam(value="flowAlias") String flowAlias, Map<String,String> data)
flowAlias
- Alias of parent flowdata
- New execution JSON data containing 'provider' attribute@Path(value="/flows/{flowAlias}/executions") @GET @Produces(value="application/json") public javax.ws.rs.core.Response getExecutions(@PathParam(value="flowAlias") String flowAlias)
flowAlias
- Flow aliaspublic void recurseExecutions(AuthenticationFlowModel flow, List<AuthenticationExecutionInfoRepresentation> result, int level)
@Path(value="/flows/{flowAlias}/executions") @PUT @Produces(value="application/json") @Consumes(value="application/json") public javax.ws.rs.core.Response updateExecutions(@PathParam(value="flowAlias") String flowAlias, AuthenticationExecutionInfoRepresentation rep)
flowAlias
- Flow aliasrep
- AuthenticationExecutionInfoRepresentation@Path(value="/executions/{executionId}") @GET @Produces(value="application/json") public javax.ws.rs.core.Response getExecution(@PathParam(value="executionId") String executionId)
@Path(value="/executions") @POST @Consumes(value="application/json") public javax.ws.rs.core.Response addExecution(AuthenticationExecutionRepresentation execution)
execution
- JSON model describing authentication executionpublic AuthenticationFlowModel getParentFlow(AuthenticationExecutionModel model)
@Path(value="/executions/{executionId}/raise-priority") @POST public void raisePriority(@PathParam(value="executionId") String execution)
execution
- Execution id@Path(value="/executions/{executionId}/lower-priority") @POST public void lowerPriority(@PathParam(value="executionId") String execution)
execution
- Execution id@Path(value="/executions/{executionId}") @DELETE public void removeExecution(@PathParam(value="executionId") String execution)
execution
- Execution id@Path(value="/executions/{executionId}/config") @POST @Consumes(value="application/json") public javax.ws.rs.core.Response newExecutionConfig(@PathParam(value="executionId") String execution, AuthenticatorConfigRepresentation json)
execution
- Execution idjson
- JSON with new configuration@Path(value="/executions/{executionId}/config/{id}") @GET @Produces(value="application/json") public AuthenticatorConfigRepresentation getAuthenticatorConfig(@PathParam(value="executionId") String execution, @PathParam(value="id") String id)
getAuthenticatorConfig(String)
execution
- Execution idid
- Configuration id@Path(value="unregistered-required-actions") @GET @Produces(value="application/json") public Stream<Map<String,String>> getUnregisteredRequiredActions()
@Path(value="register-required-action") @POST @Consumes(value="application/json") public void registerRequiredAction(Map<String,String> data)
data
- JSON containing 'providerId', and 'name' attributes.@Path(value="required-actions") @GET @Produces(value="application/json") public Stream<RequiredActionProviderRepresentation> getRequiredActions()
public static RequiredActionProviderRepresentation toRepresentation(RequiredActionProviderModel model)
@Path(value="required-actions/{alias}") @GET @Produces(value="application/json") public RequiredActionProviderRepresentation getRequiredAction(@PathParam(value="alias") String alias)
alias
- Alias of required action@Path(value="required-actions/{alias}") @PUT @Consumes(value="application/json") public void updateRequiredAction(@PathParam(value="alias") String alias, RequiredActionProviderRepresentation rep)
alias
- Alias of required actionrep
- JSON describing new state of required action@Path(value="required-actions/{alias}") @DELETE public void removeRequiredAction(@PathParam(value="alias") String alias)
alias
- Alias of required action@Path(value="required-actions/{alias}/raise-priority") @POST public void raiseRequiredActionPriority(@PathParam(value="alias") String alias)
alias
- Alias of required action@Path(value="/required-actions/{alias}/lower-priority") @POST public void lowerRequiredActionPriority(@PathParam(value="alias") String alias)
alias
- Alias of required action@Path(value="config-description/{providerId}") @GET @Produces(value="application/json") public AuthenticatorConfigInfoRepresentation getAuthenticatorConfigDescription(@PathParam(value="providerId") String providerId)
@Path(value="per-client-config-description") @GET @Produces(value="application/json") public Map<String,List<ConfigPropertyRepresentation>> getPerClientConfigDescription()
@Path(value="config") @POST @Consumes(value="application/json") public javax.ws.rs.core.Response createAuthenticatorConfig(AuthenticatorConfigRepresentation rep)
newExecutionConfig(String, AuthenticatorConfigRepresentation)
insteadrep
- JSON describing new authenticator configuration@Path(value="config/{id}") @GET @Produces(value="application/json") public AuthenticatorConfigRepresentation getAuthenticatorConfig(@PathParam(value="id") String id)
id
- Configuration id@Path(value="config/{id}") @DELETE public void removeAuthenticatorConfig(@PathParam(value="id") String id)
id
- Configuration id@Path(value="config/{id}") @PUT @Consumes(value="application/json") public void updateAuthenticatorConfig(@PathParam(value="id") String id, AuthenticatorConfigRepresentation rep)
id
- Configuration idrep
- JSON describing new state of authenticator configurationCopyright © 2021 JBoss by Red Hat. All rights reserved.