Class EntraIDCredentialProvider
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.authentication.AbstractCredentialProvider
org.ametys.plugins.extrausermgt.authentication.msal.AbstractMSALCredentialProvider
org.ametys.plugins.extrausermgt.authentication.msal.EntraIDCredentialProvider
- All Implemented Interfaces:
BlockingCredentialProvider,CredentialProvider,LogoutCapable,NonBlockingCredentialProvider,OIDCBasedCredentialProvider,LogEnabled,Component,Contextualizable,Serviceable
public class EntraIDCredentialProvider
extends AbstractMSALCredentialProvider
implements Serviceable
Sign in through Entra ID, using the OpenId Connect protocol.
-
Field Summary
Fields inherited from class org.ametys.plugins.extrausermgt.authentication.msal.AbstractMSALCredentialProvider
_clientID, _clientSecret, _prompt, _silent, ACCESS_TOKEN_SESSION_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturns the URL to send authorization and token requests to.Returns the OIDC issuer.Returns the JWK Set URL for validating OIDC tokens.protected StringgetLogin(com.microsoft.aad.msal4j.IAuthenticationResult result) Retrieves the login from the given authentication resultprotected StringGet the URL to call to logout the user from the OIDC serverReturns all needed OIDC scopes.voidInitialize the credential provider with given parameters' values.voidservice(ServiceManager manager) Methods inherited from class org.ametys.plugins.extrausermgt.authentication.msal.AbstractMSALCredentialProvider
blockingGetUserIdentity, blockingGrantAnonymousRequest, blockingIsStillConnected, blockingUserAllowed, blockingUserNotAllowed, contextualize, getClientId, init, logout, nonBlockingGetUserIdentity, nonBlockingGrantAnonymousRequest, nonBlockingIsStillConnected, nonBlockingUserAllowed, nonBlockingUserNotAllowed, refreshTokenIfNeeded, requiresNewWindowMethods inherited from class org.ametys.core.authentication.AbstractCredentialProvider
equals, getCredentialProviderModelId, getId, getLabel, getParameterValues, hashCodeMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.core.authentication.CredentialProvider
getCredentialProviderModelId, getId, getLabel, getParameterValues, getUserIdentity, grantAnonymousRequest, isStillConnected, userAllowed, userNotAllowed
-
Constructor Details
-
EntraIDCredentialProvider
public EntraIDCredentialProvider()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
init
public void init(String id, String cpModelId, Map<String, Object> paramValues, String label) throws ExceptionDescription copied from interface:CredentialProviderInitialize the credential provider with given parameters' values.- Specified by:
initin interfaceCredentialProvider- Overrides:
initin classAbstractCredentialProvider- Parameters:
id- The unique identifiercpModelId- The id of credential provider extension pointparamValues- The parameters' valueslabel- The specific label of this instance. Can be null- Throws:
Exception- If an error occurred
-
getAuthority
Description copied from class:AbstractMSALCredentialProviderReturns the URL to send authorization and token requests to.- Specified by:
getAuthorityin classAbstractMSALCredentialProvider- Returns:
- the OIDC authority URL
-
getIssuer
Description copied from interface:OIDCBasedCredentialProviderReturns the OIDC issuer.- Specified by:
getIssuerin interfaceOIDCBasedCredentialProvider- Returns:
- the OIDC issuer
-
getJwkSetURL
Description copied from interface:OIDCBasedCredentialProviderReturns the JWK Set URL for validating OIDC tokens.- Specified by:
getJwkSetURLin interfaceOIDCBasedCredentialProvider- Returns:
- the JWK Set URL
-
getScopes
Description copied from class:AbstractMSALCredentialProviderReturns all needed OIDC scopes. Defaults to ["openid"]- Overrides:
getScopesin classAbstractMSALCredentialProvider- Returns:
- all needed OIDC scopes
-
getLogin
Description copied from class:AbstractMSALCredentialProviderRetrieves the login from the given authentication result- Overrides:
getLoginin classAbstractMSALCredentialProvider- Parameters:
result- the authentication result- Returns:
- the login
-
getLogoutUrl
Description copied from class:AbstractMSALCredentialProviderGet the URL to call to logout the user from the OIDC server- Specified by:
getLogoutUrlin classAbstractMSALCredentialProvider- Returns:
- the end session endpoint URL as a string
-