Package ca.cdr.api.model.json
Class OAuth2WritableClientDetailsJson
java.lang.Object
ca.cdr.api.model.json.OAuth2WritableClientDetailsJson
- All Implemented Interfaces:
IHasAuthorities,IModelJson,IModelJson,Serializable,ClientDetails
- Direct Known Subclasses:
OAuth2ClientDetailsJson
public class OAuth2WritableClientDetailsJson
extends Object
implements ClientDetails, IHasAuthorities, IModelJson
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface ca.uhn.fhir.model.api.IModelJson
SENSITIVE_DATA_FILTER_NAME -
Constructor Summary
ConstructorsConstructorDescriptionConstructorOAuth2WritableClientDetailsJson(OAuth2WritableClientDetailsJson theClientDetailsJson) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllowedGrantType(OAuth2AuthorizedGrantTypeEnum theGrantType) voidaddAllowedGrantType(String theName) voidaddAutoApproveScopeIfNotBlank(String theScope) voidaddAutoGrantScopeIfNotBlank(String theScope) addClientSecret(OAuth2ClientSecretJson theSecret) addClientSecret(String theSecret) addClientSecret(String theSecret, Date theExpiration) voidaddPermission(PermissionEnum thePermission) voidaddPermission(PermissionEnum thePermission, String theArgument) voidaddPermission(GrantedAuthorityJson thePermission) voidaddRedirectUrlIfNotBlank(String theRedirectUrl) addScopeIfNotBlank(String theScope) The access token validity period for this client.Additional information for this client, not needed by the vanilla OAuth protocol but might be useful, for example, for storing descriptive information.Collection<org.springframework.security.core.GrantedAuthority>This method is a part of the Spring Security framework, and returns an unmodifiable copy of the client authorities.The grant types for which this client is authorized.The client id.The client secret.getClientSecret(Long thePid) Returns the authorities that are granted to the user/sessiongetPid()The refresh token validity period for this client.The pre-defined redirect URI for this client to use during the "authorization_code" access grant.The resources that this client can access.getScope()The scope of this client.booleanbooleanbooleanhasScope()booleanbooleanbooleanisAutoApprove(String theScope) Test whether client needs user approval for a particular scope.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisScoped()Whether this client is limited to a specific scope.booleanbooleanWhether a secret is required to authenticate this client.voidremovePermission(PermissionEnum thePermission, String theArgument) voidremovePermission(GrantedAuthorityJson thePermission) voidsetAccessTokenValiditySeconds(Integer theAccessTokenValiditySeconds) voidsetAllowedGrantTypes(TreeSet<OAuth2AuthorizedGrantTypeEnum> theAllowedGrantTypes) voidsetAlwaysRequireApproval(boolean theAlwaysRequireApproval) voidsetArchivedAt(Date theArchivedAt) voidsetAttestationAccepted(boolean theAttestationAccepted) voidsetAutoApproveScopes(TreeSet<String> theAutoApproveScopes) voidsetAutoGrantScopes(TreeSet<String> theAutoGrantScopes) voidsetCanIntrospectAnyTokens(boolean theCanIntrospectAnyTokens) voidsetCanIntrospectOwnTokens(boolean theCanIntrospectOwnTokens) voidsetCanReissueTokens(boolean theCanReissueTokens) setClientId(String theClientId) voidsetClientName(String theClientName) voidsetClientSecrets(List<OAuth2ClientSecretJson> theClientSecrets) voidsetCreatedByAppSphere(boolean theCreatedByAppSphere) voidsetEnabled(boolean theEnabled) voidsetFixedScope(boolean theFixedScope) voidsetJwksUrl(String theJwksUrl) voidsetPermissions(List<GrantedAuthorityJson> thePermissions) voidsetPublicJwks(String thePublicJwks) voidsetRefreshTokenValiditySeconds(Integer theRefreshTokenValiditySeconds) voidsetRegisteredRedirectUris(Iterable<String> theRegisteredRedirectUri) voidsetRegisteredRedirectUris(TreeSet<String> theRegisteredRedirectUris) voidsetRememberApprovedScopes(boolean theRememberApprovedScopes) voidvoidvoidsetSecretClientCanChange(boolean theSecretClientCanChange) voidsetSecretRequired(boolean theSecretRequired) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.cdr.api.model.json.IHasAuthorities
addAuthority, addAuthority, addAuthority, hasArgumentsForAuthority, hasAuthority
-
Field Details
-
CLIENTID_PATTERN
- See Also:
-
CLIENT_ID
- See Also:
-
CLIENT_NAME
- See Also:
-
ENABLED
- See Also:
-
PID
- See Also:
-
CLIENT_SECRET_JOINED_DELIMITER
- See Also:
-
-
Constructor Details
-
OAuth2WritableClientDetailsJson
public OAuth2WritableClientDetailsJson()Constructor -
OAuth2WritableClientDetailsJson
-
-
Method Details
-
getJwksUrl
-
setJwksUrl
-
getPublicJwks
-
setPublicJwks
-
getPermissions
Description copied from interface:IHasAuthoritiesReturns the authorities that are granted to the user/session- Specified by:
getPermissionsin interfaceIHasAuthorities
-
setPermissions
-
addAllowedGrantType
-
addAllowedGrantType
-
addAutoApproveScopeIfNotBlank
-
addRedirectUrlIfNotBlank
-
addScopeIfNotBlank
-
getAccessTokenValiditySeconds
Description copied from interface:ClientDetailsThe access token validity period for this client. Null if not set explicitly (implementations might use that fact to provide a default value for instance).- Specified by:
getAccessTokenValiditySecondsin interfaceClientDetails- Returns:
- the access token validity period
-
setAccessTokenValiditySeconds
-
getAdditionalInformation
Description copied from interface:ClientDetailsAdditional information for this client, not needed by the vanilla OAuth protocol but might be useful, for example, for storing descriptive information.- Specified by:
getAdditionalInformationin interfaceClientDetails- Returns:
- a map of additional information
-
getAllowedGrantTypes
-
setAllowedGrantTypes
-
getAuthorities
This method is a part of the Spring Security framework, and returns an unmodifiable copy of the client authorities. UsegetPermissions()if you want to modify the actual values.- Specified by:
getAuthoritiesin interfaceClientDetails- Returns:
- the authorities (never
null)
-
getAuthorizedGrantTypes
Description copied from interface:ClientDetailsThe grant types for which this client is authorized.- Specified by:
getAuthorizedGrantTypesin interfaceClientDetails- Returns:
- The grant types for which this client is authorized.
-
hasAutoApproveScopes
-
hasAutoGrantScopes
-
getAutoApproveScopes
-
setAutoApproveScopes
-
getAutoGrantScopes
-
setAutoGrantScopes
-
getAutoApproveScopesSpaceSeparated
-
getAutoGrantScopesSpaceSeparated
-
getClientId
Description copied from interface:ClientDetailsThe client id.- Specified by:
getClientIdin interfaceClientDetails- Returns:
- The client id.
-
setClientId
-
getClientName
-
setClientName
-
getClientSecret
Description copied from interface:ClientDetailsThe client secret. Ignored if thesecret isn't required.- Specified by:
getClientSecretin interfaceClientDetails- Returns:
- The client secret.
-
getClientSecrets
-
setClientSecrets
-
getPid
-
setPid
-
getRefreshTokenValiditySeconds
Description copied from interface:ClientDetailsThe refresh token validity period for this client. Null for default value set by token service, and zero or negative for non-expiring tokens.- Specified by:
getRefreshTokenValiditySecondsin interfaceClientDetails- Returns:
- the refresh token validity period
-
setRefreshTokenValiditySeconds
-
getRegisteredRedirectUri
Description copied from interface:ClientDetailsThe pre-defined redirect URI for this client to use during the "authorization_code" access grant. See OAuth spec, section 4.1.1.- Specified by:
getRegisteredRedirectUriin interfaceClientDetails- Returns:
- The pre-defined redirect URI for this client.
-
getRegisteredRedirectUris
-
setRegisteredRedirectUris
-
setRegisteredRedirectUris
-
getRegisteredRedirectUriOnePerLine
-
getResourceIds
Description copied from interface:ClientDetailsThe resources that this client can access. Can be ignored by callers if empty.- Specified by:
getResourceIdsin interfaceClientDetails- Returns:
- The resources of this client.
-
hasScope
-
getScope
Description copied from interface:ClientDetailsThe scope of this client. Empty if the client isn't scoped.- Specified by:
getScopein interfaceClientDetails- Returns:
- The scope of this client.
-
setScope
-
getScopes
-
setScopes
-
getScopeSpaceSeparated
-
isAlwaysRequireApproval
-
setAlwaysRequireApproval
-
isAutoApprove
Description copied from interface:ClientDetailsTest whether client needs user approval for a particular scope.- Specified by:
isAutoApprovein interfaceClientDetails- Parameters:
theScope- the scope to consider- Returns:
- true if this client does not need user approval
-
isCanIntrospectAnyTokens
-
setCanIntrospectAnyTokens
-
isCanIntrospectOwnTokens
-
setCanIntrospectOwnTokens
-
isFixedScope
-
setFixedScope
-
isScoped
Description copied from interface:ClientDetailsWhether this client is limited to a specific scope. If false, the scope of the authentication request will be ignored.- Specified by:
isScopedin interfaceClientDetails- Returns:
- Whether this client is limited to a specific scope.
-
isSecretRequired
Description copied from interface:ClientDetailsWhether a secret is required to authenticate this client.- Specified by:
isSecretRequiredin interfaceClientDetails- Returns:
- Whether a secret is required to authenticate this client.
-
setSecretRequired
-
isSecretClientCanChange
-
setSecretClientCanChange
-
isEnabled
-
setEnabled
-
getClientSecret
-
addClientSecret
-
addClientSecret
-
addClientSecret
-
addClientSecret
-
isCanReissueTokens
-
setCanReissueTokens
-
addAutoGrantScopeIfNotBlank
-
addPermission
-
addPermission
-
addPermission
-
removePermission
-
removePermission
-
isRememberApprovedScopes
-
setRememberApprovedScopes
-
isAttestationAccepted
-
setAttestationAccepted
-
getArchivedAt
-
setArchivedAt
-
isCreatedByAppSphere
-
setCreatedByAppSphere
-