public class LDAPFederationProvider extends Object implements UserFederationProvider
UserFederationProvider.EditMode| Modifier and Type | Field and Description |
|---|---|
static String |
EDIT_MODE |
protected UserFederationProvider.EditMode |
editMode |
static String |
LDAP_ID |
protected UserFederationProviderModel |
model |
protected org.picketlink.idm.PartitionManager |
partitionManager |
protected KeycloakSession |
session |
protected static Set<String> |
supportedCredentialTypes |
static String |
SYNC_REGISTRATIONS |
EMAIL, FIRST_NAME, LAST_NAME, USERNAME| Constructor and Description |
|---|
LDAPFederationProvider(KeycloakSession session,
UserFederationProviderModel model,
org.picketlink.idm.PartitionManager partitionManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.picketlink.idm.IdentityManager |
getIdentityManager() |
UserFederationProviderModel |
getModel() |
org.picketlink.idm.PartitionManager |
getPartitionManager() |
KeycloakSession |
getSession() |
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 void |
importPicketlinkUsers(RealmModel realm,
List<org.picketlink.idm.model.basic.User> users,
UserFederationProviderModel fedModel) |
protected UserModel |
importUserFromPicketlink(RealmModel realm,
org.picketlink.idm.model.basic.User picketlinkUser) |
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.
|
protected org.picketlink.idm.model.basic.User |
queryByEmail(org.picketlink.idm.IdentityManager identityManager,
String email) |
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.
|
protected Map<String,org.picketlink.idm.model.basic.User> |
searchPicketlink(Map<String,String> attributes,
int maxResults) |
boolean |
synchronizeRegistrations()
Should user registrations be synchronized with this provider?
FYI, only one provider will be chosen (by priority) to have this synchronization
|
boolean |
validCredentials(RealmModel realm,
UserModel user,
List<UserCredentialModel> input)
Validate credentials for this user.
|
boolean |
validCredentials(RealmModel realm,
UserModel user,
UserCredentialModel... input) |
boolean |
validPassword(String username,
String password) |
public static final String LDAP_ID
public static final String SYNC_REGISTRATIONS
public static final String EDIT_MODE
protected KeycloakSession session
protected UserFederationProviderModel model
protected org.picketlink.idm.PartitionManager partitionManager
protected UserFederationProvider.EditMode editMode
public LDAPFederationProvider(KeycloakSession session, UserFederationProviderModel model, org.picketlink.idm.PartitionManager partitionManager)
public KeycloakSession getSession()
public UserFederationProviderModel getModel()
public org.picketlink.idm.PartitionManager getPartitionManager()
public UserModel proxy(UserModel local)
UserFederationProviderproxy in interface UserFederationProviderpublic Set<String> getSupportedCredentialTypes(UserModel local)
UserFederationProvidergetSupportedCredentialTypes 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 List<UserModel> searchByAttributes(Map<String,String> attributes, RealmModel realm, int maxResults)
UserFederationProvidersearchByAttributes in interface UserFederationProviderprotected Map<String,org.picketlink.idm.model.basic.User> searchPicketlink(Map<String,String> attributes, int maxResults)
public boolean isValid(UserModel local)
UserFederationProviderisValid in interface UserFederationProviderpublic UserModel getUserByUsername(RealmModel realm, String username)
UserFederationProvidergetUserByUsername in interface UserFederationProviderpublic org.picketlink.idm.IdentityManager getIdentityManager()
protected UserModel importUserFromPicketlink(RealmModel realm, org.picketlink.idm.model.basic.User picketlinkUser)
protected org.picketlink.idm.model.basic.User queryByEmail(org.picketlink.idm.IdentityManager identityManager,
String email)
throws org.picketlink.idm.IdentityManagementException
org.picketlink.idm.IdentityManagementExceptionpublic UserModel getUserByEmail(RealmModel realm, String email)
UserFederationProvidergetUserByEmail in interface UserFederationProviderpublic void preRemove(RealmModel realm)
UserFederationProviderpreRemove in interface UserFederationProviderpublic void preRemove(RealmModel realm, RoleModel role)
UserFederationProviderpreRemove 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 void close()
close in interface UserFederationProviderclose in interface Providerprotected void importPicketlinkUsers(RealmModel realm, List<org.picketlink.idm.model.basic.User> users, UserFederationProviderModel fedModel)
Copyright © 2014. All Rights Reserved.