Package org.keycloak.federation.kerberos
Class KerberosFederationProviderFactory
- java.lang.Object
- 
- org.keycloak.federation.kerberos.KerberosFederationProviderFactory
 
- 
- All Implemented Interfaces:
- ComponentFactory<KerberosFederationProvider,UserStorageProvider>,- ConfiguredProvider,- EnvironmentDependentProviderFactory,- ProviderFactory<UserStorageProvider>,- UserStorageProviderFactory<KerberosFederationProvider>
 
 public class KerberosFederationProviderFactory extends Object implements UserStorageProviderFactory<KerberosFederationProvider>, EnvironmentDependentProviderFactory Factory for standalone Kerberos federation provider. Standalone means that it's not backed by LDAP. For Kerberos backed by LDAP (like MS AD or ApacheDS environment) you should rather use LDAP Federation Provider.- Author:
- Marek Posolda
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static List<ProviderConfigProperty>configPropertiesstatic StringPROVIDER_NAME
 - 
Constructor SummaryConstructors Constructor Description KerberosFederationProviderFactory()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()This is called when the server shuts down.KerberosFederationProvidercreate(KeycloakSession session, ComponentModel model)called per Keycloak transaction.protected KerberosServerSubjectAuthenticatorcreateKerberosSubjectAuthenticator(CommonKerberosConfig kerberosConfig)protected KerberosUsernamePasswordAuthenticatorcreateKerberosUsernamePasswordAuthenticator(CommonKerberosConfig kerberosConfig)protected SPNEGOAuthenticatorcreateSPNEGOAuthenticator(String spnegoToken, CommonKerberosConfig kerberosConfig)List<ProviderConfigProperty>getConfigProperties()StringgetId()This is the name of the provider and will be showed in the admin console as an option.voidinit(Config.Scope config)Only called once when the factory is first created.booleanisSupported()voidonCreate(KeycloakSession session, RealmModel realm, ComponentModel model)Called when UserStorageProviderModel is created.voidonUpdate(KeycloakSession session, RealmModel realm, ComponentModel oldModel, ComponentModel newModel)Called after the component is updated.voidpostInit(KeycloakSessionFactory factory)Called after all provider factories have been initializedvoidpreRemove(KeycloakSession session, RealmModel realm, ComponentModel model)Called before the component is removed.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.keycloak.component.ComponentFactorycreate
 - 
Methods inherited from interface org.keycloak.provider.ConfiguredProvidergetConfig
 - 
Methods inherited from interface org.keycloak.provider.EnvironmentDependentProviderFactoryisSupported
 - 
Methods inherited from interface org.keycloak.provider.ProviderFactorygetConfigMetadata, order
 - 
Methods inherited from interface org.keycloak.storage.UserStorageProviderFactorygetCommonProviderConfigProperties, getHelpText, getTypeMetadata, validateConfiguration
 
- 
 
- 
- 
- 
Field Detail- 
PROVIDER_NAMEpublic static final String PROVIDER_NAME - See Also:
- Constant Field Values
 
 - 
configPropertiesprotected static final List<ProviderConfigProperty> configProperties 
 
- 
 - 
Method Detail- 
createpublic KerberosFederationProvider create(KeycloakSession session, ComponentModel model) Description copied from interface:UserStorageProviderFactorycalled per Keycloak transaction.- Specified by:
- createin interface- ComponentFactory<KerberosFederationProvider,UserStorageProvider>
- Specified by:
- createin interface- UserStorageProviderFactory<KerberosFederationProvider>
 
 - 
getIdpublic String getId() Description copied from interface:UserStorageProviderFactoryThis is the name of the provider and will be showed in the admin console as an option.- Specified by:
- getIdin interface- ProviderFactory<UserStorageProvider>
- Specified by:
- getIdin interface- UserStorageProviderFactory<KerberosFederationProvider>
 
 - 
isSupportedpublic boolean isSupported() - Specified by:
- isSupportedin interface- EnvironmentDependentProviderFactory
- Returns:
- trueif the provider is supported and should be available,- falseotherwise
 
 - 
getConfigPropertiespublic List<ProviderConfigProperty> getConfigProperties() - Specified by:
- getConfigPropertiesin interface- ConfiguredProvider
- Specified by:
- getConfigPropertiesin interface- UserStorageProviderFactory<KerberosFederationProvider>
 
 - 
initpublic void init(Config.Scope config) Description copied from interface:ProviderFactoryOnly called once when the factory is first created. This config is pulled from keycloak_server.json- Specified by:
- initin interface- ProviderFactory<UserStorageProvider>
- Specified by:
- initin interface- UserStorageProviderFactory<KerberosFederationProvider>
 
 - 
postInitpublic void postInit(KeycloakSessionFactory factory) Description copied from interface:ProviderFactoryCalled after all provider factories have been initialized- Specified by:
- postInitin interface- ProviderFactory<UserStorageProvider>
- Specified by:
- postInitin interface- UserStorageProviderFactory<KerberosFederationProvider>
 
 - 
closepublic void close() Description copied from interface:ProviderFactoryThis is called when the server shuts down.- Specified by:
- closein interface- ProviderFactory<UserStorageProvider>
- Specified by:
- closein interface- UserStorageProviderFactory<KerberosFederationProvider>
 
 - 
createSPNEGOAuthenticatorprotected SPNEGOAuthenticator createSPNEGOAuthenticator(String spnegoToken, CommonKerberosConfig kerberosConfig) 
 - 
createKerberosSubjectAuthenticatorprotected KerberosServerSubjectAuthenticator createKerberosSubjectAuthenticator(CommonKerberosConfig kerberosConfig) 
 - 
createKerberosUsernamePasswordAuthenticatorprotected KerberosUsernamePasswordAuthenticator createKerberosUsernamePasswordAuthenticator(CommonKerberosConfig kerberosConfig) 
 - 
onCreatepublic void onCreate(KeycloakSession session, RealmModel realm, ComponentModel model) Description copied from interface:UserStorageProviderFactoryCalled when UserStorageProviderModel is created. This allows you to do initialization of any additional configuration you need to add. For example, you may be introspecting a database or ldap schema to automatically create mappings.- Specified by:
- onCreatein interface- ComponentFactory<KerberosFederationProvider,UserStorageProvider>
- Specified by:
- onCreatein interface- UserStorageProviderFactory<KerberosFederationProvider>
 
 - 
onUpdatepublic void onUpdate(KeycloakSession session, RealmModel realm, ComponentModel oldModel, ComponentModel newModel) Description copied from interface:ComponentFactoryCalled after the component is updated.- Specified by:
- onUpdatein interface- ComponentFactory<KerberosFederationProvider,UserStorageProvider>
- oldModel- old saved model
- newModel- new configuration
 
 - 
preRemovepublic void preRemove(KeycloakSession session, RealmModel realm, ComponentModel model) Description copied from interface:ComponentFactoryCalled before the component is removed.- Specified by:
- preRemovein interface- ComponentFactory<KerberosFederationProvider,UserStorageProvider>
- model- model of the component, which is going to be removed
 
 
- 
 
-