Package se.bth.pulse.service
Class UserDetailsImpl
java.lang.Object
se.bth.pulse.service.UserDetailsImpl
- All Implemented Interfaces:
Serializable
,org.springframework.security.core.userdetails.UserDetails
public class UserDetailsImpl
extends Object
implements org.springframework.security.core.userdetails.UserDetails
This class is used by spring security to authenticate and authorize user. It implements
UserDetails interface to change the behaviour of getAuthorities method. It also is used to change
the underlying class to our User entity.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends org.springframework.security.core.GrantedAuthority>
getUser()
boolean
boolean
boolean
boolean
boolean
-
Constructor Details
-
UserDetailsImpl
-
-
Method Details
-
getAuthorities
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
getPassword
- Specified by:
getPassword
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
getUser
-
getUsername
- Specified by:
getUsername
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonExpired
public boolean isAccountNonExpired()- Specified by:
isAccountNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonLocked
public boolean isAccountNonLocked()- Specified by:
isAccountNonLocked
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()- Specified by:
isCredentialsNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
userShouldChangePassword
public boolean userShouldChangePassword() -
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceorg.springframework.security.core.userdetails.UserDetails
-