Class EntraIDUserDirectory
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.user.directory.AbstractCachingUserDirectory
org.ametys.plugins.extrausermgt.users.entraid.EntraIDUserDirectory
- All Implemented Interfaces:
UserDirectory,LogEnabled,Disposable,Serviceable
UserDirectory listing users in Entra ID.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.user.directory.UserDirectory
UserDirectory.CredentialsResult -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for onPremisesSamAccountName attribute -
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 parametersgetUserIdentifier(com.microsoft.graph.models.User user) Get the user identifier based on the configured login attribute.voidInitialize the user's directory with given parameters' values.booleanIs the user directory case sensitive for login?Methods inherited from class org.ametys.plugins.core.impl.user.directory.AbstractCachingUserDirectory
dispose, getCacheByLogin, getCacheByMail, getId, getLabel, 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.user.directory.UserDirectory
getUserIdentity, getUserIdentity
-
Field Details
-
ON_PREMISES_SAM_ACCOUNT_NAME
Constant for onPremisesSamAccountName attribute- See Also:
-
-
Constructor Details
-
EntraIDUserDirectory
public EntraIDUserDirectory()
-
-
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
-
isCaseSensitive
Description copied from interface:UserDirectoryIs the user directory case sensitive for login?- Returns:
- true is the user directory is case sensitive
-
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
-
getUserIdentifier
Get the user identifier based on the configured login attribute.- Parameters:
user- The Azure AD user- Returns:
- The user identifier (either UserPrincipalName or OnPremisesSamAccountName)
-
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
-