Package ca.cdr.api.model.json
Class UserDetailsJson
java.lang.Object
ca.cdr.api.model.json.UserDetailsJson
- All Implemented Interfaces:
IHasAuthorities
,IModelJson
,IModelJson
,Serializable
,Cloneable
,org.springframework.security.core.userdetails.UserDetails
- Direct Known Subclasses:
UserSessionDetailsJson
public class UserDetailsJson
extends Object
implements org.springframework.security.core.userdetails.UserDetails, Cloneable, IHasAuthorities, IModelJson
Perhaps if anyone is wondering why we have such a vague fields such as associatedResources and/or defaultLaunchContexts, in our model in the first place.
It's because the SMART spec has this concept of launch contexts, where the launch context is simply the patient/encounter/location that should
be opened when the app starts.
And there's nothing more implied there, just "this is what you should open", so the reason could be anything:
- the user is that patient
- the user has picked that patient from a list
- the user is the parent of the patient
- etc
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
This structure represents a link between a user in the auth database and a resource in the FHIR database.static enum
What type of relationship does the user have to the given resource -
Field Summary
Fields inherited from interface ca.uhn.fhir.model.api.IModelJson
SENSITIVE_DATA_FILTER_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAssociatedResource
(UserDetailsJson.AssociatedResourceTypeEnum theType, String theResourceId) void
addAssociatedResource
(String theType, String theResourceId) void
addAuthorities
(GrantedAuthorityJson... theAuthority) addAuthority
(PermissionEnum thePermission) void
addAuthority
(GrantedAuthorityJson theAuthority) clone()
getEmail()
int
getNotes()
getOrCreateDefaultLaunchContext
(String theContextType) getOrCreateDefaultLaunchContext
(String theContextType, int theIndex) Returns the authorities that are granted to the user/sessiongetPid()
boolean
boolean
boolean
boolean
boolean
hasAuthority
(String thePermission) boolean
boolean
boolean
hasEmail()
boolean
boolean
boolean
hasNotes()
boolean
boolean
boolean
boolean
int
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
void
void
setAccountDisabled
(boolean theAccountDisabled) void
setAccountExpiry
(Date theAccountExpiry) void
setAccountLocked
(boolean theAccountLocked) setAuthorities
(Collection<GrantedAuthorityJson> theAuthorities) void
setCredentialExpiry
(Date theCredentialExpiry) void
setExternal
(boolean theExternal) void
setFailedLoginAttempts
(int theFailedLoginAttempts) setFamilyName
(String theFamilyName) setGivenName
(String theGivenName) void
setLastActive
(Date theLastActive) void
setLastConnected
(Date theLastConnected) setModuleId
(String theModuleId) void
setPassword
(String thePassword) void
setServiceAccount
(boolean theServiceAccount) setSystemUser
(boolean theSystemUser) setTwoFactorAuthStatus
(UserTwoFactorAuthEnum theTwoFactorAuthStatus) setUsername
(String theUsername) void
setUsernameNamespace
(String theUsernameNamespace) static PermissionEnum
toPermissionEnum
(String thePermission) toString()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ca.cdr.api.model.json.IHasAuthorities
addAuthority, addAuthority, addAuthority, hasArgumentsForAuthority, hasAuthority
-
Constructor Details
-
UserDetailsJson
public UserDetailsJson()Constructor -
UserDetailsJson
Constructor
-
-
Method Details
-
getTwoFactorAuthStatus
-
setTwoFactorAuthStatus
-
addAssociatedResource
-
addAssociatedResource
public void addAssociatedResource(UserDetailsJson.AssociatedResourceTypeEnum theType, String theResourceId) -
addAuthorities
-
addAuthority
-
addAuthority
-
addDefaultLaunchContext
-
clone
-
getAccountExpiry
-
setAccountExpiry
-
hasAccountExpiryDate
-
getAccountExpiryDateAsIsoString
-
getAssociatedResources
-
hasAuthorities
-
getAuthorities
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
setAuthorities
-
hasCredentialExpiryDate
-
getCredentialExpiry
-
setCredentialExpiry
-
getCredentialExpiryDateAsIsoString
-
hasDefaultLaunchContexts
-
getDefaultLaunchContexts
-
getDefaultLaunchContextsCommaSeparated
-
hasEmail
-
getEmail
-
setEmail
-
hasFamilyName
-
getFamilyName
-
setFamilyName
-
getFullName
-
hasGivenName
-
getGivenName
-
setGivenName
-
getLastActive
-
setLastActive
-
getLastConnected
-
setLastConnected
-
getModuleId
-
setModuleId
-
getNodeId
-
setNodeId
-
hasNotes
-
getNotes
-
setNotes
-
getPassword
- Specified by:
getPassword
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
setPassword
-
hasPassword
-
getPid
-
setPid
-
getAuthorityNames
-
getServiceUser
-
hasUsername
-
getUsername
- Specified by:
getUsername
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
setUsername
-
getPermissions
Description copied from interface:IHasAuthorities
Returns the authorities that are granted to the user/session- Specified by:
getPermissions
in interfaceIHasAuthorities
-
hasAuthority
-
hasAccountDisabled
-
isAccountDisabled
-
setAccountDisabled
-
hasAccountLocked
-
isAccountLocked
-
lockAccount
-
setAccountLocked
-
setFailedLoginAttempts
-
getFailedLoginAttempts
-
incrementFailedLoginAttempts
-
resetFailedLoginAttempts
-
isAccountNonExpired
- Specified by:
isAccountNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonLocked
- Specified by:
isAccountNonLocked
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isCredentialsNonExpired
- Specified by:
isCredentialsNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isEnabled
- Specified by:
isEnabled
in interfaceorg.springframework.security.core.userdetails.UserDetails
-
isExternal
-
setExternal
-
hasServiceAccount
-
isServiceAccount
-
setServiceAccount
-
isSystemUser
-
setSystemUser
-
toString
-
getUsernameNamespace
-
setUsernameNamespace
-
hasUsernameNamespace
-
getOrCreateDefaultLaunchContext
-
getOrCreateDefaultLaunchContext
-
toPermissionEnum
-