Class AADUserDirectory
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.user.directory.AbstractCachingUserDirectory
org.ametys.plugins.extrausermgt.users.aad.AADUserDirectory
- All Implemented Interfaces:
UserDirectory,Cacheable,LogEnabled,Disposable,Serviceable
UserDirectory listing users in Azure Active Directory.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.util.Cacheable
Cacheable.SingleCacheConfigurationNested classes/interfaces inherited from interface org.ametys.core.user.directory.UserDirectory
UserDirectory.CredentialsResult -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckCredentials(String login, String password) Authenticate a user with its credentialsprotected StringReturns a String identifying the type of this directory, used in the cache screen in _admin, such as 'SQL' or 'LDAP'.getStoredUser(String login) Get a particular user by his login.getStoredUserByEmail(String email) Get a particular user by his email (search should be case insensitive).Get the list of all users of one directory.getStoredUsers(int count, int offset, Map<String, Object> parameters) Get a list of users from a directory given the parametersvoidInitialize the user's directory with given parameters' values.Methods inherited from class org.ametys.plugins.core.impl.user.directory.AbstractCachingUserDirectory
dispose, getCacheByLogin, getCacheByMail, getCacheManager, getId, getLabel, getManagedCaches, getParameterValues, getPopulationId, getUserDirectoryModelId, service, setPopulationIdMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.core.util.Cacheable
createCaches, getCache, hasComputableSize, isCachingEnabled, removeCachesMethods inherited from interface org.ametys.core.user.directory.UserDirectory
getUserIdentity, getUserIdentity, isCaseSensitive
-
Constructor Details
-
AADUserDirectory
public AADUserDirectory()
-
-
Method Details
-
init
public void init(String id, String udModelId, Map<String, Object> paramValues, String label) throws ExceptionDescription copied from interface:UserDirectoryInitialize the user's directory with given parameters' values.- Specified by:
initin interfaceUserDirectory- Overrides:
initin classAbstractCachingUserDirectory- Parameters:
id- The non-null and non-empty unique identifierudModelId- The id of user directory extension pointparamValues- The parameters' valueslabel- The optional label- Throws:
Exception- If an error occurred
-
getCacheTypeLabel
Description copied from class:AbstractCachingUserDirectoryReturns a String identifying the type of this directory, used in the cache screen in _admin, such as 'SQL' or 'LDAP'.- Specified by:
getCacheTypeLabelin classAbstractCachingUserDirectory- Returns:
- this directory's type
-
getStoredUsers
Description copied from interface:UserDirectoryGet the list of all users of one directory.- Returns:
- list of users as Collection of
StoredUsers, empty if a problem occurs.
-
getStoredUsers
Description copied from interface:UserDirectoryGet a list of users from a directory given the parameters- Parameters:
count- The limit of users to retrieveoffset- The number of result to ignore before starting to collect users.parameters- A map of additional parameters, see implementation.- Returns:
- The list of retrieved
StoredUser
-
getStoredUser
Description copied from interface:UserDirectoryGet a particular user by his login.- Parameters:
login- Login of the user to get. Cannot be null.- Returns:
- User's information as a
StoredUserinstance or null if the user login does not exist.
-
getStoredUserByEmail
Description copied from interface:UserDirectoryGet a particular user by his email (search should be case insensitive).- Parameters:
email- Email of the user to get. Cannot be null.- Returns:
- User's information as a
StoredUserinstance or null if the user email does not exist. - Throws:
NotUniqueUserException- If many users match this email
-
checkCredentials
Description copied from interface:UserDirectoryAuthenticate a user with its credentials- Parameters:
login- The login to check. Cannot be null.password- The password to check.- Returns:
- The credentials result
-