Package org.keycloak.protocol.oidc
Class OIDCLoginProtocolFactory
java.lang.Object
org.keycloak.protocol.AbstractLoginProtocolFactory
org.keycloak.protocol.oidc.OIDCLoginProtocolFactory
- All Implemented Interfaces:
LoginProtocolFactory,ProviderFactory<LoginProtocol>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.To be removed in Keycloak 27static final StringDeprecated.To be removed in Keycloak 27static final StringDeprecated.To be removed in Keycloak 27static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.To be removed in Keycloak 27static final Stringstatic final StringConfig property for the max number of distinct OIDC parameter names memoized by theLocalCachebackingOIDCProviderConfig.getMaxLengthForTheParameter(String, boolean).static final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intdetermines the order in which the login protocols are displayed in the dropdown boxes in the UIstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAcrClientScope(RealmModel newRealm) addBasicClientScope(RealmModel newRealm) addClientDelegationClientScope(RealmModel newRealm) protected voidaddDefaults(ClientModel client) addMicroprofileJWTClientScope(RealmModel newRealm) Adds themicroprofile-jwtoptional client scope to the specified realm.addRolesClientScope(RealmModel newRealm) addServiceAccountClientScope(RealmModel newRealm) addUserDelegationClientScope(RealmModel newRealm) addWebOriginsClientScope(RealmModel newRealm) voidclose()This is called when the server shuts down.create(KeycloakSession session) protected voidcreateDefaultClientScopesImpl(RealmModel newRealm) Impl should create default client scopes.createProtocolEndpoint(KeycloakSession session, EventBuilder event) Optional method used to declare that a ProviderFactory has a dependency on one or more Providers.List of built in protocol mappers that can be used to apply to clients.Returns the metadata for each configuration property supported by this factory.getId()voidinit(Config.Scope config) Only called once when the factory is first created.intorder()defines the option-order in the admin-uivoidpostInit(KeycloakSessionFactory factory) Called after all provider factories have been initializedvoidsetupClientDefaults(ClientRepresentation rep, ClientModel newClient) Setup default values for new clients.Methods inherited from class org.keycloak.protocol.AbstractLoginProtocolFactory
addClientScopeDefaults, addDefaultClientScopes, addDefaultClientScopes, createDefaultClientScopesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.protocol.LoginProtocolFactory
allowAsClientProtocol, isValidClientScope, onConsentRevoked, validateClientScope, validateClientScopeAssignment
-
Field Details
-
UI_ORDER
public static final int UI_ORDERdetermines the order in which the login protocols are displayed in the dropdown boxes in the UI- See Also:
-
USERNAME
- See Also:
-
EMAIL
- See Also:
-
EMAIL_VERIFIED
- See Also:
-
GIVEN_NAME
- See Also:
-
FAMILY_NAME
- See Also:
-
MIDDLE_NAME
- See Also:
-
NICKNAME
- See Also:
-
PROFILE_CLAIM
- See Also:
-
PICTURE
- See Also:
-
WEBSITE
- See Also:
-
GENDER
- See Also:
-
BIRTHDATE
- See Also:
-
ZONEINFO
- See Also:
-
UPDATED_AT
- See Also:
-
FULL_NAME
- See Also:
-
LOCALE
- See Also:
-
ADDRESS
- See Also:
-
PHONE_NUMBER
- See Also:
-
PHONE_NUMBER_VERIFIED
- See Also:
-
REALM_ROLES
- See Also:
-
CLIENT_ROLES
- See Also:
-
AUDIENCE_RESOLVE
- See Also:
-
ALLOWED_WEB_ORIGINS
- See Also:
-
ACR
- See Also:
-
DELEGATION_MAY_ACT_SUB
- See Also:
-
CLIENT_DELEGATION_MAY_ACT_SUB
- See Also:
-
CLIENT_DELEGATION_MAY_ACT_CLIENT_ID
- See Also:
-
CLIENT_DELEGATION_AUDIENCE
- See Also:
-
ORGANIZATION
- See Also:
-
UPN
- See Also:
-
GROUPS
- See Also:
-
ROLES_SCOPE
- See Also:
-
WEB_ORIGINS_SCOPE
- See Also:
-
MICROPROFILE_JWT_SCOPE
- See Also:
-
ACR_SCOPE
- See Also:
-
BASIC_SCOPE
- See Also:
-
USER_DELEGATION_SCOPE
- See Also:
-
CLIENT_DELEGATION_SCOPE
- See Also:
-
PROFILE_SCOPE_CONSENT_TEXT
- See Also:
-
EMAIL_SCOPE_CONSENT_TEXT
- See Also:
-
ADDRESS_SCOPE_CONSENT_TEXT
- See Also:
-
PHONE_SCOPE_CONSENT_TEXT
- See Also:
-
OFFLINE_ACCESS_SCOPE_CONSENT_TEXT
- See Also:
-
ROLES_SCOPE_CONSENT_TEXT
- See Also:
-
ORGANIZATION_SCOPE_CONSENT_TEXT
- See Also:
-
CONFIG_OIDC_REQ_PARAMS_DEFAULT_MAX_SIZE
- See Also:
-
CONFIG_OIDC_REQ_TOKEN_PARAMS_DEFAULT_MAX_SIZE
- See Also:
-
CONFIG_OIDC_REQ_PARAMS_MAX_SIZE_PREFIX
- See Also:
-
CONFIG_OIDC_ADD_REQ_PARAMS_MAX_NUMBER
- See Also:
-
CONFIG_OIDC_ADD_REQ_PARAMS_MAX_SIZE
- See Also:
-
CONFIG_OIDC_ADD_REQ_PARAMS_MAX_OVERALL_SIZE
- See Also:
-
CONFIG_OIDC_ADD_REQ_PARAMS_FAIL_FAST
- See Also:
-
CONFIG_OIDC_ADD_REQ_TOKEN_PARAMS_FAIL_FAST
- See Also:
-
CONFIG_OIDC_ALLOW_MULTIPLE_AUDIENCES_FOR_JWT_CLIENT_AUTHENTICATION
Deprecated.To be removed in Keycloak 27- See Also:
-
CONFIG_ALLOW_OIDC_PARAMS_IN_REDIRECT_URIS
Deprecated.To be removed in Keycloak 27- See Also:
-
CONFIG_ALLOW_TOKEN_INTROSPECTION_WITHOUT_AUDIENCE_CHECK
- See Also:
-
CONFIG_ALLOW_USERINFO_WITH_LIGHTWEIGHT_ACCESS_TOKEN
- See Also:
-
CONFIG_ALLOW_CLIENT_INITIATED_ACCOUNT_LINKING
Deprecated.To be removed in Keycloak 27- See Also:
-
CONFIG_ALLOW_INITIATING_IDP_LOGOUT_PARAM
Deprecated.To be removed in Keycloak 27- See Also:
-
CONFIG_OIDC_REQ_PARAMS_MAX_LENGTH_CACHE_SIZE
Config property for the max number of distinct OIDC parameter names memoized by theLocalCachebackingOIDCProviderConfig.getMaxLengthForTheParameter(String, boolean). Standard OIDC parameter names are a small, fixed set, so this is never expected to be reached in practice; it only protects against memory growth in case that method is called with arbitrary, attacker-controlled parameter names (e.g. fromTokenEndpoint).- See Also:
-
DEFAULT_REQ_PARAMS_MAX_LENGTH_CACHE_SIZE
public static final int DEFAULT_REQ_PARAMS_MAX_LENGTH_CACHE_SIZE- See Also:
-
-
Constructor Details
-
OIDCLoginProtocolFactory
public OIDCLoginProtocolFactory()
-
-
Method Details
-
init
Description copied from interface:ProviderFactoryOnly called once when the factory is first created.- Specified by:
initin interfaceProviderFactory<LoginProtocol>- Overrides:
initin classAbstractLoginProtocolFactory
-
postInit
Description copied from interface:ProviderFactoryCalled after all provider factories have been initialized- Specified by:
postInitin interfaceProviderFactory<LoginProtocol>- Overrides:
postInitin classAbstractLoginProtocolFactory
-
close
public void close()Description copied from interface:ProviderFactoryThis is called when the server shuts down.- Specified by:
closein interfaceProviderFactory<LoginProtocol>- Overrides:
closein classAbstractLoginProtocolFactory
-
dependsOn
Description copied from interface:ProviderFactoryOptional method used to declare that a ProviderFactory has a dependency on one or more Providers. If a Provider is declared here, it is guaranteed that the dependenciesProviderFactory.postInit(org.keycloak.models.KeycloakSessionFactory)method will be executed before this ProviderFactory'sProviderFactory.postInit(org.keycloak.models.KeycloakSessionFactory). Similarly, it's guaranteed thatProviderFactory.close()will be called on thisProviderFactorybeforeProviderFactory.close()is called on any of the dependent ProviderFactory implementations. -
create
-
getBuiltinMappers
Description copied from interface:LoginProtocolFactoryList of built in protocol mappers that can be used to apply to clients.- Returns:
-
createDefaultClientScopesImpl
Description copied from class:AbstractLoginProtocolFactoryImpl should create default client scopes. This is called usually when new realm is created- Specified by:
createDefaultClientScopesImplin classAbstractLoginProtocolFactory
-
addRolesClientScope
-
addWebOriginsClientScope
-
addMicroprofileJWTClientScope
Adds themicroprofile-jwtoptional client scope to the specified realm. If amicroprofile-jwtclient scope already exists in the realm then the existing scope is returned. Otherwise, a new scope is created and returned.- Parameters:
newRealm- the realm to which themicroprofile-jwtscope is to be added.- Returns:
- a reference to the
microprofile-jwtclient scope that was either created or already exists in the realm.
-
addAcrClientScope
-
addBasicClientScope
-
addServiceAccountClientScope
-
addUserDelegationClientScope
-
addClientDelegationClientScope
-
addDefaults
- Specified by:
addDefaultsin classAbstractLoginProtocolFactory
-
createProtocolEndpoint
-
getId
-
setupClientDefaults
Description copied from interface:LoginProtocolFactorySetup default values for new clients. This expects that the representation has already set up the client -
order
public int order()defines the option-order in the admin-ui -
getConfigMetadata
Description copied from interface:ProviderFactoryReturns the metadata for each configuration property supported by this factory.- Returns:
- a list with the metadata for each configuration property supported by this factory
-