Search in sources :

Example 21 with ProviderConfigProperty

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);
}
Also used : ProviderConfigProperty(org.keycloak.provider.ProviderConfigProperty)

Example 22 with ProviderConfigProperty

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;
}
Also used : ProviderConfigProperty(org.keycloak.provider.ProviderConfigProperty) LinkedList(java.util.LinkedList)

Example 23 with ProviderConfigProperty

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);
}
Also used : ProviderConfigProperty(org.keycloak.provider.ProviderConfigProperty)

Example 24 with ProviderConfigProperty

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);
}
Also used : ProviderConfigProperty(org.keycloak.provider.ProviderConfigProperty)

Example 25 with ProviderConfigProperty

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);
}
Also used : ProviderConfigProperty(org.keycloak.provider.ProviderConfigProperty)

Aggregations

ProviderConfigProperty (org.keycloak.provider.ProviderConfigProperty)30 ArrayList (java.util.ArrayList)3 LinkedList (java.util.LinkedList)3 ComponentFactory (org.keycloak.component.ComponentFactory)3 ComponentTypeRepresentation (org.keycloak.representations.idm.ComponentTypeRepresentation)3 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 Produces (javax.ws.rs.Produces)2 NoCache (org.jboss.resteasy.annotations.cache.NoCache)2 MultivaluedHashMap (org.keycloak.common.util.MultivaluedHashMap)2 ConfigPropertyRepresentation (org.keycloak.representations.idm.ConfigPropertyRepresentation)2 IOException (java.io.IOException)1 LinkedHashMap (java.util.LinkedHashMap)1 NotFoundException (javax.ws.rs.NotFoundException)1 ConfigurableAuthenticatorFactory (org.keycloak.authentication.ConfigurableAuthenticatorFactory)1 SubComponentFactory (org.keycloak.component.SubComponentFactory)1 ConfiguredProvider (org.keycloak.provider.ConfiguredProvider)1