public class SecurityService extends Object implements org.springframework.security.core.userdetails.UserDetailsService
| Constructor and Description |
|---|
SecurityService()
Instantiates a new security service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changePassword(String userName,
String currentPassword,
String newPassword)
Change password.
|
User |
createAccount(String username,
String firstname,
String lastname,
String password,
UserRole role)
Creates the account.
|
protected User |
findAccountUsername(String username)
Find account username.
|
protected void |
init()
Inits the.
|
User |
loadUserByUsername(String username)
Load user by username.
|
protected void |
processCurrentAccount(User account)
Process current account.
|
protected void |
processNewAccount(User account)
Process new account.
|
User |
resetAccount(String username)
Reset account.
|
protected void |
resetAccount(User account)
Reset account.
|
protected void init()
public User 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 User createAccount(String username, String firstname, String lastname, String password, UserRole role)
username - the usernamefirstname - the firstnamelastname - the lastnamepassword - the passwordrole - the roleprotected void processNewAccount(User account)
account - the accountprotected void processCurrentAccount(User account)
account - the accountpublic User resetAccount(String username)
username - the usernameprotected void resetAccount(User account)
account - the accountprotected User findAccountUsername(String username)
username - the usernameCopyright © 2023 Smart-Cloud. All rights reserved.