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.SingleCacheConfiguration
Nested classes/interfaces inherited from interface org.ametys.core.user.directory.UserDirectory
UserDirectory.CredentialsResult
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncheckCredentials
(String login, String password) Authenticate a user with its credentialsprotected String
Returns 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 parametersvoid
Initialize 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, setPopulationId
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.util.Cacheable
createCaches, getCache, hasComputableSize, isCachingEnabled, removeCaches
Methods 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:UserDirectory
Initialize the user's directory with given parameters' values.- Specified by:
init
in interfaceUserDirectory
- Overrides:
init
in 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:AbstractCachingUserDirectory
Returns a String identifying the type of this directory, used in the cache screen in _admin, such as 'SQL' or 'LDAP'.- Specified by:
getCacheTypeLabel
in classAbstractCachingUserDirectory
- Returns:
- this directory's type
-
getStoredUsers
Description copied from interface:UserDirectory
Get the list of all users of one directory.- Returns:
- list of users as Collection of
StoredUser
s, empty if a problem occurs.
-
getStoredUsers
Description copied from interface:UserDirectory
Get 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:UserDirectory
Get a particular user by his login.- Parameters:
login
- Login of the user to get. Cannot be null.- Returns:
- User's information as a
StoredUser
instance or null if the user login does not exist.
-
getStoredUserByEmail
Description copied from interface:UserDirectory
Get 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
StoredUser
instance or null if the user email does not exist. - Throws:
NotUniqueUserException
- If many users match this email
-
checkCredentials
Description copied from interface:UserDirectory
Authenticate a user with its credentials- Parameters:
login
- The login to check. Cannot be null.password
- The password to check.- Returns:
- The credentials result
-