Package org.ametys.web.usermanagement
Class UserPasswordAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.web.usermanagement.UserPasswordAction
- All Implemented Interfaces:
Component,LogEnabled,Serviceable,Action
Handle the lost password and change password actions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderThe current user providerprotected RenderingContextHandlerThe rendering context handler.protected UserSignupManagerThe user signup manager.Fields inherited from class org.apache.cocoon.acting.ServiceableAction
managerFields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) protected voidchangeUserPassword(Request request, String siteName, String token, Multimap<String, I18nizableText> errors) Sign-up the user: create a real user from his temporary information.protected voidcheckPasswordToken(Request request, String siteName, String login, String token, String populationId, Multimap<String, I18nizableText> errors) Check that a token is valid.protected voidresetConnectedUserPassword(Request request, String siteName, String language, Multimap<String, I18nizableText> errors) Reset a connected user password.protected voidresetPassword(Request request, String siteName, String language, Multimap<String, I18nizableText> errors) Reset a user's sign-up request.voidservice(ServiceManager serviceManager) protected voidsetGlobalError(UserManagementException.StatusError error, Multimap<String, I18nizableText> errors, String login, String populationId) Set the global error if there is one.Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_userSignupManager
The user signup manager. -
_renderingContextHandler
The rendering context handler. -
_currentUserProvider
The current user provider
-
-
Constructor Details
-
UserPasswordAction
public UserPasswordAction()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableAction- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-
resetPassword
protected void resetPassword(Request request, String siteName, String language, Multimap<String, I18nizableText> errors) throws UserManagementExceptionReset a user's sign-up request.- Parameters:
request- the user request.siteName- the site name.language- the language.errors- the Map to fill with errors to display to the user.- Throws:
UserManagementException- if an error occurs.
-
resetConnectedUserPassword
protected void resetConnectedUserPassword(Request request, String siteName, String language, Multimap<String, I18nizableText> errors) throws UserManagementExceptionReset a connected user password.- Parameters:
request- the user request.siteName- the site name.language- the language.errors- the Map to fill with errors to display to the user.- Throws:
UserManagementException- if an error occurs.
-
checkPasswordToken
protected void checkPasswordToken(Request request, String siteName, String login, String token, String populationId, Multimap<String, I18nizableText> errors) throws UserManagementExceptionCheck that a token is valid.- Parameters:
request- the user request.siteName- the site name.login- the user login.token- the sign-up token that was sent to the user.populationId- The id of the populationerrors- the Map to fill with errors to display to the user.- Throws:
UserManagementException- if an error occurs.
-
changeUserPassword
protected void changeUserPassword(Request request, String siteName, String token, Multimap<String, I18nizableText> errors) throws UserManagementExceptionSign-up the user: create a real user from his temporary information.- Parameters:
request- the user request.siteName- the site name.token- the sign-up token that was sent to the user.errors- the Map to fill with errors to display to the user.- Throws:
UserManagementException- if an error occurs.
-
setGlobalError
protected void setGlobalError(UserManagementException.StatusError error, Multimap<String, I18nizableText> errors, String login, String populationId) Set the global error if there is one.- Parameters:
error- The error to add (can be null)errors- The errors maplogin- The login of the user (can be null)populationId- The population of the user (can be null)
-