Package org.ametys.plugins.core.user
Class UserDAO.ImpersonateCredentialProvider
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.authentication.AbstractCredentialProvider
org.ametys.plugins.core.user.UserDAO.ImpersonateCredentialProvider
- All Implemented Interfaces:
BlockingCredentialProvider,CredentialProvider,LogEnabled,Component
- Enclosing class:
- UserDAO
public static class UserDAO.ImpersonateCredentialProvider
extends AbstractCredentialProvider
implements BlockingCredentialProvider
A fake credential provider used by the impersonate process
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblockingGetUserIdentity(Redirector redirector) Method called by AuthenticateAction each time a request need authentication.booleanMethod called by AuthenticateAction before asking for credentials.booleanblockingIsStillConnected(UserIdentity userIdentity, Redirector redirector) Validates that the user specify is still connectedvoidblockingUserAllowed(UserIdentity userIdentity, Redirector redirector) Method called by AuthenticateAction after authentication process succeededvoidblockingUserNotAllowed(Redirector redirector) Method called by AuthenticateAction each a user could not get authenticated.booleanDoes this blocking credential provider requires a new window to process.Methods inherited from class org.ametys.core.authentication.AbstractCredentialProvider
equals, getCredentialProviderModelId, getId, getLabel, getParameterValues, hashCode, initMethods 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, init, isStillConnected, userAllowed, userNotAllowed
-
Constructor Details
-
ImpersonateCredentialProvider
public ImpersonateCredentialProvider()
-
-
Method Details
-
blockingGrantAnonymousRequest
Description copied from interface:BlockingCredentialProviderMethod called by AuthenticateAction before asking for credentials. This method is used to bypass authentication. If this method returns true, no authentication will be required. Use it with care, as it may lead to obvious security issues.- Specified by:
blockingGrantAnonymousRequestin interfaceBlockingCredentialProvider- Returns:
- true if the Request is not authenticated
-
blockingIsStillConnected
Description copied from interface:BlockingCredentialProviderValidates that the user specify is still connected- Specified by:
blockingIsStillConnectedin interfaceBlockingCredentialProvider- 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
-
blockingGetUserIdentity
Description copied from interface:BlockingCredentialProviderMethod called by AuthenticateAction each time a request need authentication.- Specified by:
blockingGetUserIdentityin interfaceBlockingCredentialProvider- Parameters:
redirector- the cocoon redirector.- Returns:
- the
UserIdentitycorresponding to the user (with or without population specified), or null if user could not get authenticated.
-
blockingUserNotAllowed
Description copied from interface:BlockingCredentialProviderMethod called by AuthenticateAction each a user could not get authenticated. This method implementation is responsible of redirecting response to appropriate url.- Specified by:
blockingUserNotAllowedin interfaceBlockingCredentialProvider- Parameters:
redirector- the cocoon Redirector that can be used for redirecting response.
-
blockingUserAllowed
Description copied from interface:BlockingCredentialProviderMethod called by AuthenticateAction after authentication process succeeded- Specified by:
blockingUserAllowedin interfaceBlockingCredentialProvider- Parameters:
userIdentity- The user correctly connectedredirector- the cocoon Redirector that can be used for redirecting response.
-
requiresNewWindow
Description copied from interface:BlockingCredentialProviderDoes this blocking credential provider requires a new window to process.- Specified by:
requiresNewWindowin interfaceBlockingCredentialProvider- Returns:
- true to ask the client to process this credential provider throught a new window
-