Search in sources :

Example 1 with MapAuthenticationExecutionEntity

use of org.keycloak.models.map.realm.entity.MapAuthenticationExecutionEntity in project keycloak by keycloak.

the class MapRealmAdapter method addAuthenticatorExecution.

@Override
public AuthenticationExecutionModel addAuthenticatorExecution(AuthenticationExecutionModel model) {
    if (entity.getAuthenticationExecution(model.getId()).isPresent()) {
        throw new ModelDuplicateException("An RequiredActionProvider with given id already exists");
    }
    MapAuthenticationExecutionEntity executionEntity = MapAuthenticationExecutionEntity.fromModel(model);
    entity.addAuthenticationExecution(executionEntity);
    return MapAuthenticationExecutionEntity.toModel(executionEntity);
}
Also used : ModelDuplicateException(org.keycloak.models.ModelDuplicateException) MapAuthenticationExecutionEntity(org.keycloak.models.map.realm.entity.MapAuthenticationExecutionEntity)

Aggregations

ModelDuplicateException (org.keycloak.models.ModelDuplicateException)1 MapAuthenticationExecutionEntity (org.keycloak.models.map.realm.entity.MapAuthenticationExecutionEntity)1