public class KerberosFederationProvider extends Object implements UserFederationProvider
UserFederationProvider.EditMode| Modifier and Type | Field and Description |
|---|---|
protected KerberosFederationProviderFactory |
factory |
static String |
KERBEROS_PRINCIPAL |
protected KerberosConfig |
kerberosConfig |
protected UserFederationProviderModel |
model |
protected KeycloakSession |
session |
EMAIL, FIRST_NAME, LAST_NAME, USERNAME| Constructor and Description |
|---|
KerberosFederationProvider(KeycloakSession session,
UserFederationProviderModel model,
KerberosFederationProviderFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected UserModel |
findOrCreateAuthenticatedUser(RealmModel realm,
String username)
Called after successful authentication
|
Set<String> |
getSupportedCredentialTypes()
What UserCredentialModel types should be handled by this provider? This is called in scenarios when we don't know user,
who is going to authenticate (For example Kerberos authentication).
|
Set<String> |
getSupportedCredentialTypes(UserModel local)
What UserCredentialModel types should be handled by this provider for this user? Keycloak will only call
validCredentials() with the credential types specified in this method.
|
UserModel |
getUserByEmail(RealmModel realm,
String email)
Required to import into local storage any user found.
|
UserModel |
getUserByUsername(RealmModel realm,
String username)
Required to import into local storage any user found.
|
protected UserModel |
importUserToKeycloak(RealmModel realm,
String username) |
boolean |
isValid(UserModel local)
Is the Keycloak UserModel still valid and/or existing in federated storage?
|
void |
preRemove(RealmModel realm)
called whenever a Realm is removed
|
void |
preRemove(RealmModel realm,
RoleModel role)
called before a role is removed.
|
UserModel |
proxy(UserModel local)
Gives the provider an option to proxy UserModels loaded from local storage.
|
UserModel |
register(RealmModel realm,
UserModel user)
Called if this federation provider has priority and supports synchronized registrations.
|
boolean |
removeUser(RealmModel realm,
UserModel user) |
List<UserModel> |
searchByAttributes(Map<String,String> attributes,
RealmModel realm,
int maxResults)
Required to import into local storage any user found.
|
boolean |
synchronizeRegistrations()
Should user registrations be synchronized with this provider?
FYI, only one provider will be chosen (by priority) to have this synchronization
|
CredentialValidationOutput |
validCredentials(RealmModel realm,
UserCredentialModel credential)
Validate credentials of unknown user.
|
boolean |
validCredentials(RealmModel realm,
UserModel user,
List<UserCredentialModel> input)
Validate credentials for this user.
|
boolean |
validCredentials(RealmModel realm,
UserModel user,
UserCredentialModel... input) |
protected boolean |
validPassword(String username,
String password) |
public static final String KERBEROS_PRINCIPAL
protected KeycloakSession session
protected UserFederationProviderModel model
protected KerberosConfig kerberosConfig
protected KerberosFederationProviderFactory factory
public KerberosFederationProvider(KeycloakSession session, UserFederationProviderModel model, KerberosFederationProviderFactory factory)
public UserModel proxy(UserModel local)
UserFederationProviderproxy in interface UserFederationProviderpublic boolean synchronizeRegistrations()
UserFederationProvidersynchronizeRegistrations in interface UserFederationProviderpublic UserModel register(RealmModel realm, UserModel user)
UserFederationProviderregister in interface UserFederationProviderpublic boolean removeUser(RealmModel realm, UserModel user)
removeUser in interface UserFederationProviderpublic UserModel getUserByUsername(RealmModel realm, String username)
UserFederationProvidergetUserByUsername in interface UserFederationProviderpublic UserModel getUserByEmail(RealmModel realm, String email)
UserFederationProvidergetUserByEmail in interface UserFederationProviderpublic List<UserModel> searchByAttributes(Map<String,String> attributes, RealmModel realm, int maxResults)
UserFederationProvidersearchByAttributes in interface UserFederationProviderpublic void preRemove(RealmModel realm)
UserFederationProviderpreRemove in interface UserFederationProviderpublic void preRemove(RealmModel realm, RoleModel role)
UserFederationProviderpreRemove in interface UserFederationProviderpublic boolean isValid(UserModel local)
UserFederationProviderisValid in interface UserFederationProviderpublic Set<String> getSupportedCredentialTypes(UserModel local)
UserFederationProvidergetSupportedCredentialTypes in interface UserFederationProviderpublic Set<String> getSupportedCredentialTypes()
UserFederationProvidergetSupportedCredentialTypes in interface UserFederationProviderpublic boolean validCredentials(RealmModel realm, UserModel user, List<UserCredentialModel> input)
UserFederationProvidervalidCredentials in interface UserFederationProviderpublic boolean validCredentials(RealmModel realm, UserModel user, UserCredentialModel... input)
validCredentials in interface UserFederationProviderpublic CredentialValidationOutput validCredentials(RealmModel realm, UserCredentialModel credential)
UserFederationProvidervalidCredentials in interface UserFederationProviderpublic void close()
close in interface UserFederationProviderclose in interface Providerprotected UserModel findOrCreateAuthenticatedUser(RealmModel realm, String username)
realm - realmusername - username without realm prefixprotected UserModel importUserToKeycloak(RealmModel realm, String username)
Copyright © 2015. All rights reserved.