Package org.ametys.core.authentication
Interface NonBlockingCredentialProvider
- All Superinterfaces:
CredentialProvider
- All Known Implementing Classes:
AbstractMSALCredentialProvider,AbstractOIDCCredentialProvider,ADFSCredentialProvider,AutoDiscoveringOIDCCredentialProvider,CASCredentialProvider,DefinedCredentialProvider,EntraIDCredentialProvider,FacebookCredentialProvider,FormCredentialProvider,GenericOIDCCredentialProvider,GoogleCredentialProvider,KerberosCredentialProvider,RemoteUserCredentialProvider
Defines a
CredentialProvider that can be non-blocking.-
Method Summary
Modifier and TypeMethodDescriptionnonBlockingGetUserIdentity(Redirector redirector) Method called by AuthenticateAction each time a request need authentication.booleanMethod called by AuthenticateAction before asking for credentials.booleannonBlockingIsStillConnected(UserIdentity userIdentity, Redirector redirector) Validates that the user specify is still connectedvoidnonBlockingUserAllowed(UserIdentity userIdentity, Redirector redirector) Method called by AuthenticateAction after authentication process succeededvoidnonBlockingUserNotAllowed(Redirector redirector) Method called by AuthenticateAction each a user could not get authenticated.Methods inherited from interface org.ametys.core.authentication.CredentialProvider
getCredentialProviderModelId, getId, getLabel, getParameterValues, getUserIdentity, grantAnonymousRequest, init, isStillConnected, userAllowed, userNotAllowed
-
Method Details
-
nonBlockingGrantAnonymousRequest
boolean nonBlockingGrantAnonymousRequest()Method called by AuthenticateAction before asking for credentials. This method is used to bypass authentication. If this method returns true, no authentication will be require. Use it with care, as it may lead to obvious security issues.- Returns:
- true if the Request is not authenticated
-
nonBlockingIsStillConnected
boolean nonBlockingIsStillConnected(UserIdentity userIdentity, Redirector redirector) throws Exception Validates that the user specify is still connected- Parameters:
userIdentity- the user previously correctly identified with this credential providerredirector- The cocoon redirector- Returns:
- true if this CredentialProvider was in a valid state, false to restart authentication process
- Throws:
Exception- If an error occurred
-
nonBlockingGetUserIdentity
Method called by AuthenticateAction each time a request need authentication.- Parameters:
redirector- the cocoon redirector.- Returns:
- the
UserIdentitycorresponding to the user (with or without population specified), or null if user could not get authenticated. - Throws:
Exception- if something wrong occurs
-
nonBlockingUserNotAllowed
Method called by AuthenticateAction each a user could not get authenticated. This method implementation is responsible of redirecting response to appropriate url.- Parameters:
redirector- the cocoon Redirector that can be used for redirecting response.- Throws:
Exception- if something wrong occurs
-
nonBlockingUserAllowed
Method called by AuthenticateAction after authentication process succeeded- Parameters:
userIdentity- The user correctly connectedredirector- the cocoon Redirector that can be used for redirecting response.- Throws:
Exception- if something wrong occurs
-