public class SpringSecurityContextService extends Object implements SecurityContextService
Constructor and Description |
---|
SpringSecurityContextService() |
Modifier and Type | Method and Description |
---|---|
String |
getPassword()
Get the user password about the currently logged in user
|
String |
getUsername()
Get the user name about the currently logged in user
|
boolean |
hasRole(String role)
Check if the currently logged in user has the required role.
|
boolean |
isAuthenticated()
Check if the currently logged in user is authenticated.
|
public String getUsername()
SecurityContextService
getUsername
in interface SecurityContextService
public String getPassword()
SecurityContextService
getPassword
in interface SecurityContextService
public boolean hasRole(String role)
SecurityContextService
hasRole
in interface SecurityContextService
role
- - required rolepublic boolean isAuthenticated()
SecurityContextService
isAuthenticated
in interface SecurityContextService
Copyright © 2021. All rights reserved.