Package idatt2106.group3.backend.Model
Class UserSecurityDetails
- java.lang.Object
-
- idatt2106.group3.backend.Model.UserSecurityDetails
-
- All Implemented Interfaces:
java.io.Serializable
,org.springframework.security.core.userdetails.UserDetails
public class UserSecurityDetails extends java.lang.Object implements org.springframework.security.core.userdetails.UserDetails
Entity class for storing information about authenticated user UserDetails including userId- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserSecurityDetails()
UserSecurityDetails(java.lang.String password, java.lang.String email, long userId, java.util.List<? extends org.springframework.security.core.GrantedAuthority> grantedAuthorities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<? extends org.springframework.security.core.GrantedAuthority>
getAuthorities()
java.lang.String
getPassword()
long
getUserId()
java.lang.String
getUsername()
boolean
isAccountNonExpired()
boolean
isAccountNonLocked()
boolean
isCredentialsNonExpired()
boolean
isEnabled()
void
setAccountNonExpired(boolean isAccountNonExpired)
void
setAccountNonLocked(boolean isAccountNonLocked)
void
setCredentialsNonExpired(boolean isCredentialsNonExpired)
void
setEnabled(boolean isEnabled)
void
setGrantedAuthorities(java.util.List<? extends org.springframework.security.core.GrantedAuthority> grantedAuthorities)
void
setUsername(java.lang.String email)
-
-
-
Method Detail
-
getPassword
public java.lang.String getPassword()
- Specified by:
getPassword
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
setUsername
public void setUsername(java.lang.String email)
-
getUsername
public java.lang.String getUsername()
- Specified by:
getUsername
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
getUserId
public long getUserId()
-
setGrantedAuthorities
public void setGrantedAuthorities(java.util.List<? extends org.springframework.security.core.GrantedAuthority> grantedAuthorities)
-
getAuthorities
public java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
setAccountNonExpired
public void setAccountNonExpired(boolean isAccountNonExpired)
-
isAccountNonExpired
public boolean isAccountNonExpired()
- Specified by:
isAccountNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
setAccountNonLocked
public void setAccountNonLocked(boolean isAccountNonLocked)
-
isAccountNonLocked
public boolean isAccountNonLocked()
- Specified by:
isAccountNonLocked
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
setCredentialsNonExpired
public void setCredentialsNonExpired(boolean isCredentialsNonExpired)
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()
- Specified by:
isCredentialsNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
setEnabled
public void setEnabled(boolean isEnabled)
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
-