Class SubjectModel
- java.lang.Object
-
- com.tetsuwantech.atom.web.GenericModel
-
- com.tetsuwantech.atom.web.authentication.SubjectModel
-
- All Implemented Interfaces:
Serializable
,org.springframework.security.core.AuthenticatedPrincipal
,org.springframework.security.core.userdetails.UserDetails
,org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
,org.springframework.security.oauth2.core.user.OAuth2User
public class SubjectModel extends GenericModel implements org.springframework.security.core.userdetails.UserDetails, org.springframework.security.oauth2.core.user.OAuth2User
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
SUBJECT
static String
USERNAME
-
Fields inherited from class com.tetsuwantech.atom.web.GenericModel
id, LENGTH, LONG_LENGTH
-
-
Constructor Summary
Constructors Constructor Description SubjectModel()
SubjectModel(Subject subject)
SubjectModel(Long id)
-
Method Summary
-
Methods inherited from class com.tetsuwantech.atom.web.GenericModel
equals, getId, hashCode, setId, toString
-
-
-
-
Field Detail
-
SUBJECT
public static final String SUBJECT
- See Also:
- Constant Field Values
-
USERNAME
public static final String USERNAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLastLogin
public Instant getLastLogin()
- Returns:
- the lastLogin
-
setLastLogin
public void setLastLogin(Instant lastLogin)
- Parameters:
lastLogin
- the lastLogin to set
-
getGivenName
public String getGivenName()
- Returns:
- the givenName
-
setGivenName
public void setGivenName(String givenName)
- Parameters:
givenName
- the givenName to set
-
getFamilyName
public String getFamilyName()
- Returns:
- the familyName
-
setFamilyName
public void setFamilyName(String familyName)
- Parameters:
familyName
- the familyName to set
-
getFullName
public String getFullName()
- Returns:
- the fullName
-
getTimeZone
public String getTimeZone()
-
setTimeZone
public void setTimeZone(String timeZone)
-
getTimeZoneId
public ZoneId getTimeZoneId()
-
setPassword
public void setPassword(String password)
-
getPassword
public String getPassword()
- Specified by:
getPassword
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
setUsername
public void setUsername(String username)
-
getUsername
public String getUsername()
- Specified by:
getUsername
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
getJoined
public Instant getJoined()
- Returns:
- the joined
-
setJoined
public void setJoined(Instant joined)
- Parameters:
joined
- the joined to set
-
getUuid
public String getUuid()
- Returns:
- the uuid
-
setUuid
public void setUuid(String uuid)
- Parameters:
uuid
- the uuid to set
-
getUuidExpired
public Instant getUuidExpired()
-
getStatus
public Subject.Status getStatus()
-
setStatus
public void setStatus(Subject.Status status)
-
getPasswordExpires
public Instant getPasswordExpires()
-
setPasswordExpires
public void setPasswordExpires(Instant passwordExpires)
-
isSocial
public boolean isSocial()
-
setSocial
public void setSocial(boolean isSocial)
-
isDeactivatable
public boolean isDeactivatable()
-
setDeactivatable
public void setDeactivatable(boolean isDeactivatable)
-
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
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isPending
public boolean isPending()
-
getAvatarUrl
public String getAvatarUrl()
-
setAvatarUrl
public void setAvatarUrl(String avatarUrl)
-
getClientRegistrationId
public String getClientRegistrationId()
-
setClientRegistrationId
public void setClientRegistrationId(String clientRegistrationId)
-
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
- Specified by:
getAuthorities
in interfaceorg.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
getAttributes
public Map<String,Object> getAttributes()
- Specified by:
getAttributes
in interfaceorg.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.springframework.security.core.AuthenticatedPrincipal
-
-