public class AccountServices extends Object implements org.springframework.security.core.userdetails.UserDetailsService
| Constructor and Description |
|---|
AccountServices()
Instantiates a new account services.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changePassword(String userName,
String currentPassword,
String newPassword)
Change password.
|
Account |
createAccount(String email,
String firstname,
String lastname,
String password)
Creates the account.
|
protected String |
createLoginLink(Account account)
Creates the login link.
|
protected void |
createToken(Account account)
Creates the token.
|
protected Account |
findAccountByEmail(String email)
Find account by email.
|
Account |
loadDetailsByToken(String tokenString)
Load details by token.
|
Account |
loadUserByUsername(String username)
Load user by username.
|
static void |
main(String[] args)
The main method.
|
protected void |
processCurrentAccount(Account account)
Process current account.
|
protected void |
processNewAccount(Account account)
Process new account.
|
protected void |
resetAccount(Account account)
Reset account.
|
Account |
resetAccount(String email)
Reset account.
|
protected void |
resetToken(Account account)
Reset token.
|
void |
setEmailVerified(Account account)
Sets the email verified.
|
public Account loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
loadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsServiceusername - the usernameorg.springframework.security.core.userdetails.UsernameNotFoundException - the username not found exceptionpublic Account createAccount(String email, String firstname, String lastname, String password) throws AccountAlreadyExistsException
email - the emailfirstname - the firstnamelastname - the lastnamepassword - the passwordAccountAlreadyExistsException - the account already exists exceptionprotected void processNewAccount(Account account)
account - the accountprotected void processCurrentAccount(Account account)
account - the accountpublic Account resetAccount(String email)
email - the emailprotected void resetAccount(Account account)
account - the accountprotected String createLoginLink(Account account)
account - the accountpublic Account loadDetailsByToken(String tokenString)
tokenString - the token stringprotected void resetToken(Account account)
account - the accountprotected void createToken(Account account)
account - the accountpublic static void main(String[] args)
args - the argumentspublic void setEmailVerified(Account account)
account - the new email verifiedprotected Account findAccountByEmail(String email)
email - the emailCopyright © 2023 Smart-Cloud. All rights reserved.