use of org.keycloak.provider.ProviderConfigProperty in project keycloak by keycloak.
the class ProtocolMappersClientRegistrationPolicyFactory method postInit.
@Override
public void postInit(KeycloakSessionFactory factory) {
super.postInit(factory);
ProviderConfigProperty property;
property = new ProviderConfigProperty();
property.setName(ALLOWED_PROTOCOL_MAPPER_TYPES);
property.setLabel("allowed-protocol-mappers.label");
property.setHelpText("allowed-protocol-mappers.tooltip");
property.setType(ProviderConfigProperty.MULTIVALUED_LIST_TYPE);
property.setOptions(getProtocolMapperFactoryIds());
configProperties.add(property);
}
use of org.keycloak.provider.ProviderConfigProperty in project keycloak by keycloak.
the class ClientScopesClientRegistrationPolicyFactory method getConfigProperties.
@Override
public List<ProviderConfigProperty> getConfigProperties(KeycloakSession session) {
List<ProviderConfigProperty> configProps = new LinkedList<>();
ProviderConfigProperty property;
property = new ProviderConfigProperty();
property.setName(ALLOWED_CLIENT_SCOPES);
property.setLabel("allowed-client-scopes.label");
property.setHelpText("allowed-client-scopes.tooltip");
property.setType(ProviderConfigProperty.MULTIVALUED_LIST_TYPE);
if (session != null) {
property.setOptions(getClientScopes(session));
}
configProps.add(property);
property = new ProviderConfigProperty();
property.setName(ALLOW_DEFAULT_SCOPES);
property.setLabel("allow-default-scopes.label");
property.setHelpText("allow-default-scopes.tooltip");
property.setType(ProviderConfigProperty.BOOLEAN_TYPE);
property.setDefaultValue(true);
configProps.add(property);
configProperties = configProps;
return configProperties;
}
use of org.keycloak.provider.ProviderConfigProperty in project keycloak by keycloak.
the class UserSessionLimitsAuthenticatorFactory method getConfigProperties.
@Override
public List<ProviderConfigProperty> getConfigProperties() {
ProviderConfigProperty userRealmLimit = new ProviderConfigProperty();
userRealmLimit.setName(USER_REALM_LIMIT);
userRealmLimit.setLabel("Maximum concurrent sessions for each user within this realm.");
userRealmLimit.setHelpText("Provide a zero or negative value to disable this limit.");
userRealmLimit.setType(ProviderConfigProperty.STRING_TYPE);
userRealmLimit.setDefaultValue("3");
ProviderConfigProperty userClientLimit = new ProviderConfigProperty();
userClientLimit.setName(USER_CLIENT_LIMIT);
userClientLimit.setLabel("Maximum concurrent sessions for each user per keycloak client.");
userClientLimit.setHelpText("Provide a zero or negative value to disable this limit. In case a limit for the realm is enabled, specify this value below the total realm limit.");
userClientLimit.setType(ProviderConfigProperty.STRING_TYPE);
userClientLimit.setDefaultValue("0");
ProviderConfigProperty behaviourProperty = new ProviderConfigProperty();
behaviourProperty.setName(BEHAVIOR);
behaviourProperty.setLabel("Behavior when user session limit is exceeded");
behaviourProperty.setType(ProviderConfigProperty.LIST_TYPE);
behaviourProperty.setDefaultValue(DENY_NEW_SESSION);
behaviourProperty.setOptions(Arrays.asList(DENY_NEW_SESSION, TERMINATE_OLDEST_SESSION));
ProviderConfigProperty customErrorMessage = new ProviderConfigProperty();
customErrorMessage.setName(ERROR_MESSAGE);
customErrorMessage.setLabel("Optional custom error message");
customErrorMessage.setHelpText("If left empty a default error message is shown");
customErrorMessage.setType(ProviderConfigProperty.STRING_TYPE);
return Arrays.asList(userRealmLimit, userClientLimit, behaviourProperty, customErrorMessage);
}
use of org.keycloak.provider.ProviderConfigProperty in project keycloak by keycloak.
the class DenyAccessAuthenticatorFactory method getConfigProperties.
@Override
public List<ProviderConfigProperty> getConfigProperties() {
ProviderConfigProperty errorMessage = new ProviderConfigProperty();
errorMessage.setType(ProviderConfigProperty.STRING_TYPE);
errorMessage.setName(ERROR_MESSAGE);
errorMessage.setLabel("Error message");
errorMessage.setHelpText("Error message which will be shown to the user. " + "You can directly define particular message or property, which will be used for mapping the error message f.e `deny-access-role1`. " + "If the field is blank, default property 'access-denied' is used.");
return Collections.singletonList(errorMessage);
}
use of org.keycloak.provider.ProviderConfigProperty in project keycloak by keycloak.
the class ConditionalUserAttributeValueFactory method getConfigProperties.
@Override
public List<ProviderConfigProperty> getConfigProperties() {
ProviderConfigProperty authNoteName = new ProviderConfigProperty();
authNoteName.setType(ProviderConfigProperty.STRING_TYPE);
authNoteName.setName(CONF_ATTRIBUTE_NAME);
authNoteName.setLabel("Attribute name");
authNoteName.setHelpText("Name of the attribute to check");
ProviderConfigProperty authNoteExpectedValue = new ProviderConfigProperty();
authNoteExpectedValue.setType(ProviderConfigProperty.STRING_TYPE);
authNoteExpectedValue.setName(CONF_ATTRIBUTE_EXPECTED_VALUE);
authNoteExpectedValue.setLabel("Expected attribute value");
authNoteExpectedValue.setHelpText("Expected value in the attribute");
ProviderConfigProperty negateOutput = new ProviderConfigProperty();
negateOutput.setType(ProviderConfigProperty.BOOLEAN_TYPE);
negateOutput.setName(CONF_NOT);
negateOutput.setLabel("Negate output");
negateOutput.setHelpText("Apply a not to the check result");
return Arrays.asList(authNoteName, authNoteExpectedValue, negateOutput);
}
Aggregations