Package it.univr.passportease.config
Class AppUserDetails
java.lang.Object
it.univr.passportease.config.AppUserDetails
- All Implemented Interfaces:
Serializable,org.springframework.security.core.userdetails.UserDetails
public class AppUserDetails
extends Object
implements org.springframework.security.core.userdetails.UserDetails
Implementation of
UserDetails that represents a user- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAppUserDetails(UUID id, String hashPassword, List<org.springframework.security.core.GrantedAuthority> authorities) Constructor ofAppUserDetails. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.core.userdetails.UserDetails
getAuthorities, getPassword
-
Field Details
-
name
The user id -
password
The user password -
authorities
The authorities of the user
-
-
Constructor Details
-
AppUserDetails
public AppUserDetails(UUID id, String hashPassword, List<org.springframework.security.core.GrantedAuthority> authorities) Constructor ofAppUserDetails. It takes the user id, the user password and the user authorities and creates aUserDetailsobject.- Parameters:
id- user idhashPassword- user passwordauthorities- user authorities
-
-
Method Details
-
getUsername
- Specified by:
getUsernamein interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- user id
-
isAccountNonExpired
public boolean isAccountNonExpired()- Specified by:
isAccountNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- true if the user is not expired, always true in this implementation
-
isAccountNonLocked
public boolean isAccountNonLocked()- Specified by:
isAccountNonLockedin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- true if the user is not locked, always true in this implementation
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()- Specified by:
isCredentialsNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- true if the user credentials are not expired, always true in this implementation
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- true if the user is enabled, always true in this implementation
-