%OAuth2.Server.Properties
Class %OAuth2.Server.Properties Extends %Persistent [ System = 4 ]
%OAuth2.Server.Properties stores the properties and claims that are used to communicate between various parts of the OAuth 2.0 authorization server. See the description of each property of this class to understand usage of the properties and claims.
Note that storage is not in a % global. Therefore allowing the claim to be viewed from any namespace, but only opened or saved with the proper credentials.
Properties
RequestProperties
Property RequestProperties As array Of %String(MAXLEN = "");
RequestProperties contains the query parameters from the authorization request.
RequestProperties.GetAt() is the value of the query parameter.
ResponseProperties
Property ResponseProperties As array Of %String(MAXLEN = "");
ResponseProperties contains the properties to be added to the JSON response object to a token request.
ResponseProperties.GetAt() is the value of the JSON response property.
CustomProperties
Property CustomProperties As array Of %String(MAXLEN = "");
CustomProperties contains the custom properties to be used to communicate between various pieces of customization code.
CustomProperties.GetAt() is the value of the property.
ServerProperties
Property ServerProperties As array Of %String(MAXLEN = "");
ServerProperties contains properties that the authorization server chooses to share with the customization code.
The logo_uri, client_uri, policy_uri and tos_uri client properties are shared in this way for use by the Authentication Class.
ServerProperties.GetAt() is the value of the property.
IDTokenClaims
Property IDTokenClaims As array Of %OAuth2.Server.Claim;
IDTokenClaims specifies the claims that are needed for the IDToken beyond the base set of required claims. The "iss", "sub", "exp", "sid", "aud" and "azp" claims will be returned even if not in IDTokenClaims. The claims are defined based on the scope and request claims parameter. The value to be returned for the claim will have the same key in the ClaimValues property. The value of the claims will usually be set by the ValidateUser class.
IDTokenClaims.GetAt() defines the claim.
UserinfoClaims
Property UserinfoClaims As array Of %OAuth2.Server.Claim;
UserinfoClaims specifies the claims that need to be returned by the Userinfo endpoint beyond the base required claims. The "sub" claim will be returned even if not in UserinfoClaims. The claims are defined based on the scope and request claims parameter. The value to be returned for the claim will have the same key in the ClaimValues property. The value of the claims will usually be set by the ValidateUser class.
UserinfoClaims.GetAt() defines the claim.
IntrospectionClaims
Property IntrospectionClaims As array Of %OAuth2.Server.Claim;
IntrospectionClaims specifies the claims that need to be returned by the Introspection endpoint beyond the base required claims. The scope, client_id, username, token_type, exp, iat, nbf, sub, aud, iss and jti claims will be returned even if they are not in IntrospectionClaims. The value of the claims will usually be set by the ValidateUser class.
IntrospectionClaims.GetAt() defines the claim.
JWTClaims
Property JWTClaims As array Of %OAuth2.Server.Claim;
JWTClaims specifies the claims that are needed for the JWT access token that is returned by the default JWT based access token class (%OAuth2.Server.JWT) beyond the base set of required claims. The "iss", "sub", "exp", "aud", "jti", and "scope" claims will be returned even if not in JWTClaims. The claims are defined by the customization code. The value to be returned for the claim will have the same key in the ClaimValues property. The value of the claims will usually be set by the ValidateUser class.
JWTClaims.GetAt() defines the claim.
JWTHeaderClaims
Property JWTHeaderClaims As array Of %OAuth2.Server.Claim;
JWTHeaderClaims specifies the claims to include in the JOSE Header for the JWT access token that is returned by the default JWT based access token class (%OAuth2.Server.JWT) beyond the set of headers required by the signature or encryption options in use. The key can be either the name of a claim that exists in the ClaimValues property, or "jku" or "jwk". If "jku" is specified, then the "jku" field will be defined in JOSE header, containing the value of the relevant JWKS URL. If "jwk" is specified, then the "jwk" field will be defined, containing the JWK for the relvant public key. In both cases, the field will only be defined in the header if signing or encryption is being used with an asymmetric algorithm. It is not valid to specify other JOSE header fields defined by RFC 7515.
The claims are defined by the customization code. The value to be returned for the claim will have the same key in the ClaimValues property. The value of the claims will usually be set by the ValidateUser class.
JWTHeaderClaims.GetAt() defines the claim.
ClaimValues
Property ClaimValues As array Of %String(MAXLEN = "");
ClaimValues associates the value to be returned for the claim will with the claim having the same key in a claims array.
Each claim value is stored as $lb(type,value) where type = "string", "boolean", "number" or "object".
If type="object", then value is the JSON object serialized as a string. For all types, if the value is a $list, then it is an array of the specified type.
Methods
SetClaimValue
Method SetClaimValue(name As %String, value As %String, type As %String = "string")
Set the value of the claim named by the name argument.
type = "string", "boolean", "number" or "object". The default type is "string" If type="object", then value is the JSON object serialized as a string. For all types, if the value is a $list, then it is an array of the specified type.
RemoveClaimValue
Method RemoveClaimValue(name As %String)
Remove the value of the claim named by the name argument.
GetClaimValue
Method GetClaimValue(name As %String, Output type) As %String
Get the value and type of the claim named by the name argument.
GetConvertedClaimValue
Method GetConvertedClaimValue(name As %String, Output type) As %String
Get the value and type of the claim named by the name argument with $list value converted to %DynamicArray
NextClaimValue
Method NextClaimValue(name As %String) As %String
Get the next name from the ClaimValues property
LogProperties
Method LogProperties(ByRef data) [ Internal ]
Log a server token