Class UserObject
java.lang.Object
io.github.navjotsrakhra.eventmanager.user.authentication.data.model.UserObject
- All Implemented Interfaces:
Serializable,org.springframework.security.core.userdetails.UserDetails
@Entity
public class UserObject
extends Object
implements org.springframework.security.core.userdetails.UserDetails
The UserObject class represents a user entity with user details.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends org.springframework.security.core.GrantedAuthority> Get the authorities granted to the user.booleanCheck if the user account is not expired.booleanCheck if the user account is not locked.booleanCheck if the user credentials are not expired.booleanCheck if the user account is enabled.Methods 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
getPassword, getUsername
-
Constructor Details
-
UserObject
public UserObject()
-
-
Method Details
-
getAuthorities
Get the authorities granted to the user.- Specified by:
getAuthoritiesin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- A collection of GrantedAuthority objects.
-
isAccountNonExpired
public boolean isAccountNonExpired()Check if the user account is not expired.- Specified by:
isAccountNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- true if the account is not expired, false otherwise.
-
isAccountNonLocked
public boolean isAccountNonLocked()Check if the user account is not locked.- Specified by:
isAccountNonLockedin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- true if the account is not locked, false otherwise.
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()Check if the user credentials are not expired.- Specified by:
isCredentialsNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- true if the credentials are not expired, false otherwise.
-
isEnabled
public boolean isEnabled()Check if the user account is enabled.- Specified by:
isEnabledin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- true if the account is enabled, false otherwise.
-