use of org.keycloak.models.map.realm.entity.MapIdentityProviderMapperEntity in project keycloak by keycloak.
the class MapRealmAdapter method addIdentityProviderMapper.
@Override
public IdentityProviderMapperModel addIdentityProviderMapper(IdentityProviderMapperModel model) {
MapIdentityProviderMapperEntity identityProviderMapper = MapIdentityProviderMapperEntity.fromModel(model);
if (entity.getIdentityProviderMapper(model.getId()).isPresent()) {
throw new ModelDuplicateException("An IdentityProviderMapper with given id already exists");
}
entity.addIdentityProviderMapper(identityProviderMapper);
return MapIdentityProviderMapperEntity.toModel(identityProviderMapper);
}
Aggregations