public class CillaUserDetails extends Object implements org.springframework.security.core.userdetails.UserDetails
UserDetails
that also provides the database ID, user name and
role name of the user that is currently logged in.
This object is immutable.
Constructor and Description |
---|
CillaUserDetails(User user)
Instantiates a new
CillaUserDetails for the given User . |
Modifier and Type | Method and Description |
---|---|
Collection<org.springframework.security.core.GrantedAuthority> |
getAuthorities() |
Locale |
getLocale()
User's locale.
|
String |
getName()
User's full name.
|
String |
getPassword() |
String |
getRole()
User's role name.
|
TimeZone |
getTimeZone()
User's time zone.
|
long |
getUserId()
User's ID.
|
String |
getUsername() |
boolean |
isAccountNonExpired() |
boolean |
isAccountNonLocked() |
boolean |
isCredentialsNonExpired() |
boolean |
isEnabled() |
public CillaUserDetails(User user)
CillaUserDetails
for the given User
.user
- the User
public Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
getAuthorities
in interface org.springframework.security.core.userdetails.UserDetails
public String getPassword()
getPassword
in interface org.springframework.security.core.userdetails.UserDetails
public String getUsername()
getUsername
in interface org.springframework.security.core.userdetails.UserDetails
public boolean isAccountNonExpired()
isAccountNonExpired
in interface org.springframework.security.core.userdetails.UserDetails
public boolean isAccountNonLocked()
isAccountNonLocked
in interface org.springframework.security.core.userdetails.UserDetails
public boolean isCredentialsNonExpired()
isCredentialsNonExpired
in interface org.springframework.security.core.userdetails.UserDetails
public boolean isEnabled()
isEnabled
in interface org.springframework.security.core.userdetails.UserDetails
public long getUserId()
public TimeZone getTimeZone()
Copyright © 2009–2016. All rights reserved.