use of org.keycloak.representations.idm.PasswordPolicyTypeRepresentation in project keycloak by keycloak.
the class ServerInfoAdminResource method setPasswordPolicies.
private void setPasswordPolicies(ServerInfoRepresentation info) {
List<PasswordPolicyTypeRepresentation> passwordPolicyTypes = session.getKeycloakSessionFactory().getProviderFactoriesStream(PasswordPolicyProvider.class).map(PasswordPolicyProviderFactory.class::cast).map(factory -> {
PasswordPolicyTypeRepresentation rep = new PasswordPolicyTypeRepresentation();
rep.setId(factory.getId());
rep.setDisplayName(factory.getDisplayName());
rep.setConfigType(factory.getConfigType());
rep.setDefaultValue(factory.getDefaultConfigValue());
rep.setMultipleSupported(factory.isMultiplSupported());
return rep;
}).collect(Collectors.toList());
info.setPasswordPolicies(passwordPolicyTypes);
}
Aggregations