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)
UserFederationProvider
proxy
in interface UserFederationProvider
public Set<String> getSupportedCredentialTypes(UserModel local)
UserFederationProvider
getSupportedCredentialTypes
in interface UserFederationProvider
public boolean synchronizeRegistrations()
UserFederationProvider
synchronizeRegistrations
in interface UserFederationProvider
public UserModel register(RealmModel realm, UserModel user)
UserFederationProvider
register
in interface UserFederationProvider
public boolean removeUser(RealmModel realm, UserModel user)
removeUser
in interface UserFederationProvider
public List<UserModel> searchByAttributes(Map<String,String> attributes, RealmModel realm, int maxResults)
UserFederationProvider
searchByAttributes
in interface UserFederationProvider
protected Map<String,org.picketlink.idm.model.basic.User> searchPicketlink(Map<String,String> attributes, int maxResults)
public boolean isValid(UserModel local)
UserFederationProvider
isValid
in interface UserFederationProvider
public UserModel getUserByUsername(RealmModel realm, String username)
UserFederationProvider
getUserByUsername
in interface UserFederationProvider
public 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.IdentityManagementException
public UserModel getUserByEmail(RealmModel realm, String email)
UserFederationProvider
getUserByEmail
in interface UserFederationProvider
public void preRemove(RealmModel realm)
UserFederationProvider
preRemove
in interface UserFederationProvider
public void preRemove(RealmModel realm, RoleModel role)
UserFederationProvider
preRemove
in interface UserFederationProvider
public boolean validCredentials(RealmModel realm, UserModel user, List<UserCredentialModel> input)
UserFederationProvider
validCredentials
in interface UserFederationProvider
public boolean validCredentials(RealmModel realm, UserModel user, UserCredentialModel... input)
validCredentials
in interface UserFederationProvider
public void close()
close
in interface UserFederationProvider
close
in interface Provider
protected void importPicketlinkUsers(RealmModel realm, List<org.picketlink.idm.model.basic.User> users, UserFederationProviderModel fedModel)
Copyright © 2014. All Rights Reserved.