Package com.logicaldoc.web.service
Class LoginServiceImpl
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
-
- com.google.gwt.user.server.rpc.RemoteServiceServlet
-
- com.logicaldoc.web.service.LoginServiceImpl
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService
,com.google.gwt.user.server.rpc.SerializationPolicyProvider
,LoginService
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class LoginServiceImpl extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements LoginService
Implementation of theLoginService
- Since:
- 7.5
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.logicaldoc.gui.login.client.services.LoginService
LoginService.Instance
-
-
Constructor Summary
Constructors Constructor Description LoginServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GUIValue
changePassword(long userId, String oldPassword, String newPassword)
Changes the password of a userString
generatePassword(String username)
Generates a password using the configured policies.GUIUser
getUser(String username)
boolean
isSecretKeyRequired(String username, String deviceId)
Check if a secret key must be provided by the uservoid
resetPassword(String username, String emailAddress, String productName)
Reset the password for the given email.-
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
getSerializationPolicy, init, processCall, processCall, processPost
-
-
-
-
Method Detail
-
changePassword
public GUIValue changePassword(long userId, String oldPassword, String newPassword)
Description copied from interface:LoginService
Changes the password of a user- Specified by:
changePassword
in interfaceLoginService
- Parameters:
userId
- The user IdentifieroldPassword
- can be null or is the old passwordnewPassword
- the new password- Returns:
- the error code and message. 0 if all went ok, 1 if the password is incorrect, 2 if the new password cannot be notified, 3 if the password has been already used, otherwise a positive number grater than 3
-
getUser
public GUIUser getUser(String username)
- Specified by:
getUser
in interfaceLoginService
-
resetPassword
public void resetPassword(String username, String emailAddress, String productName) throws ServerException
Description copied from interface:LoginService
Reset the password for the given email.- Specified by:
resetPassword
in interfaceLoginService
- Parameters:
username
- the username for which reset passwordemailAddress
- the email for which reset passwordproductName
- the application product name- Throws:
ServerException
- error in the server application
-
isSecretKeyRequired
public boolean isSecretKeyRequired(String username, String deviceId) throws ServerException
Description copied from interface:LoginService
Check if a secret key must be provided by the user- Specified by:
isSecretKeyRequired
in interfaceLoginService
- Parameters:
username
- the username trying to logindeviceId
- identifier of the current device- Returns:
- True only if the user must provide the secret key
- Throws:
ServerException
- if the user is unexisting or any kind of server error
-
generatePassword
public String generatePassword(String username)
Description copied from interface:LoginService
Generates a password using the configured policies.- Specified by:
generatePassword
in interfaceLoginService
- Parameters:
username
- the current user- Returns:
- the generated password
-
-