@Service public class CustomCredentialsService extends Object implements CredentialsService
CredentialsService implementationadminId| Constructor and Description |
|---|
CustomCredentialsService() |
| Modifier and Type | Method and Description |
|---|---|
String |
getHashedPassword(User user)
Return a string with hashed representation of password.
|
boolean |
isProtected(Long userId)
Is user with given id protected from being removed or modified?
|
boolean |
isProtected(User user)
Is this user protected from being removed or modified?
|
public boolean isProtected(User user)
CredentialsServiceisProtected in interface CredentialsServiceuser - A user to checkpublic boolean isProtected(Long userId)
CredentialsServiceisProtected in interface CredentialsServiceuserId - A user id to checkpublic String getHashedPassword(User user)
CredentialsServiceIf provided user has no password, the random one will be generated and set into corresponding field.
getHashedPassword in interface CredentialsServiceuser - A user whose password will be hashed