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
Nested ClassesModifier and TypeClassDescriptionstatic classThis structure represents a link between a user in the auth database and a resource in the FHIR database.static enumWhat 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssociatedResource(UserDetailsJson.AssociatedResourceTypeEnum theType, String theResourceId) voidaddAssociatedResource(String theType, String theResourceId) voidaddAuthorities(GrantedAuthorityJson... theAuthority) addAuthority(PermissionEnum thePermission) voidaddAuthority(GrantedAuthorityJson theAuthority) clone()getDefaultLaunchContextResourceIdForContextType(String theContextType) getEmail()intgetNotes()getOrCreateDefaultLaunchContext(String theContextType) getOrCreateDefaultLaunchContext(String theContextType, int theIndex) Returns the authorities that are granted to the user/sessiongetPid()booleanbooleanbooleanbooleanbooleanhasAuthority(String thePermission) booleanbooleanbooleanhasEmail()booleanbooleanbooleanhasNotes()booleanbooleanbooleanbooleanintbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidvoidvoidsetAccountDisabled(boolean theAccountDisabled) voidsetAccountExpiry(Date theAccountExpiry) voidsetAccountLocked(boolean theAccountLocked) setAuthorities(Collection<GrantedAuthorityJson> theAuthorities) voidsetCredentialExpiry(Date theCredentialExpiry) voidsetExternal(boolean theExternal) voidsetFailedLoginAttempts(int theFailedLoginAttempts) setFamilyName(String theFamilyName) setGivenName(String theGivenName) voidsetLastActive(Date theLastActive) voidsetLastConnected(Date theLastConnected) setModuleId(String theModuleId) voidsetPassword(String thePassword) voidsetServiceAccount(boolean theServiceAccount) setSystemUser(boolean theSystemUser) setTwoFactorAuthStatus(UserTwoFactorAuthEnum theTwoFactorAuthStatus) setUsername(String theUsername) voidsetUsernameNamespace(String theUsernameNamespace) static PermissionEnumtoPermissionEnum(String thePermission) toString()Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getAuthoritiesin interfaceorg.springframework.security.core.userdetails.UserDetails
-
setAuthorities
-
hasCredentialExpiryDate
-
getCredentialExpiry
-
setCredentialExpiry
-
getCredentialExpiryDateAsIsoString
-
hasDefaultLaunchContexts
-
getDefaultLaunchContexts
-
getDefaultLaunchContextResourceIdForContextType
public Optional<String> getDefaultLaunchContextResourceIdForContextType(@Nonnull String theContextType) -
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:
getPasswordin interfaceorg.springframework.security.core.userdetails.UserDetails
-
setPassword
-
hasPassword
-
getPid
-
setPid
-
getAuthorityNames
-
getServiceUser
-
hasUsername
-
getUsername
- Specified by:
getUsernamein interfaceorg.springframework.security.core.userdetails.UserDetails
-
setUsername
-
getPermissions
Description copied from interface:IHasAuthoritiesReturns the authorities that are granted to the user/session- Specified by:
getPermissionsin interfaceIHasAuthorities
-
hasAuthority
-
hasAccountDisabled
-
isAccountDisabled
-
setAccountDisabled
-
hasAccountLocked
-
isAccountLocked
-
lockAccount
-
setAccountLocked
-
setFailedLoginAttempts
-
getFailedLoginAttempts
-
incrementFailedLoginAttempts
-
resetFailedLoginAttempts
-
isAccountNonExpired
- Specified by:
isAccountNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonLocked
- Specified by:
isAccountNonLockedin interfaceorg.springframework.security.core.userdetails.UserDetails
-
isCredentialsNonExpired
- Specified by:
isCredentialsNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails
-
isEnabled
- Specified by:
isEnabledin interfaceorg.springframework.security.core.userdetails.UserDetails
-
isExternal
-
setExternal
-
hasServiceAccount
-
isServiceAccount
-
setServiceAccount
-
isSystemUser
-
setSystemUser
-
toString
-
getUsernameNamespace
-
setUsernameNamespace
-
hasUsernameNamespace
-
getOrCreateDefaultLaunchContext
-
getOrCreateDefaultLaunchContext
-
toPermissionEnum
-