Skip to main content
AskMe (beta)
Loading icon

HS.HC.OAuth2.Server.Validate

class HS.HC.OAuth2.Server.Validate extends %OAuth2.Server.Validate

This class overrides API methods from core product class %OAuth2.Server.Validate. It provides logic for fulfilling requirements of HL7 SMART on FHIR.

Method Inventory

Parameters

parameter AdditionalSupportedClaims;
Any additional custom claims to support.
parameter SMARTOnFHIRContextClaims;
Supported SMART on FHIR context claims.

Methods

classmethod SetClaimsFromJson(pProperties As %OAuth2.Server.Properties, pClaimsJson As %DynamicObject)
@API.Method
This method is called by ValidateUserLocal(). It may also be called by existing ValidateUser() customizations. It copies the supported claims in the pClaimsJson dynamic object into the pProperties ClaimValues array.
@Argument pProperties The properties object for the current token request.
@Argument pClaimsJson %DynamicObject representation of the claims name-value pairs from the current token request.
classmethod SupportedClaims() as %List
@API.Method
This implementation of the SupportedClaims method returns a list of the claims specified by the product base version of this method, plus the SMART on FHIR claims that the IRIS for Health FHIR server supports. Override the AdditionalSupportedClaims class parameter to add claims to the list.
classmethod ValidateUser(pUsername As %String, pPassword As %String, pScope As %ArrayOfDataTypes, pProperties As %OAuth2.Server.Properties, Output pStatus As %Status, Output pUse2fa As %Boolean = 0) as %Boolean
@API.Method
This is the IRIS for Health implementation of the Validate User customization processing method. It calls core product ValidateUser processing first, then calls IRIS for Health custom processing in the ValidateUserLocal method next.
@Argument pUsername Username.
@Argument pPassword Password.
@Argument pScope Array of scopes.
@Argument pProperties The properties object for the current token request.
@Output pStatus %Status indicating success or error in processing.
@Output pUse2fa Boolean indicating whether two factor authentication should be used. This value is currently not updated by this implementation of this method.
@Return Boolean indicator of successful or unsuccessful user validation.
classmethod ValidateUserLocal(pUsername As %String, pPassword As %String, pScope As %ArrayOfDataTypes, pProperties As %OAuth2.Server.Properties, Output pStatus As %Status, Output pUse2fa As %Boolean = 0) as %Boolean
@API.Method
This method is the default processing that is called after calling the core class implementation of ValidateUser.
  • Gets the JSON string from pProperties.RequestProperties."claims" and makes a %DynamicObject from it.
  • Calls SetClaimsFromJson to place the claims and values into the pProperties ClaimValues array. Corresponding logic in HS.HC.OAuth2.Server.Generate will cause those claims to be included in the various pProperties claims arrays.
    @Argument pUsername Username.
    @Argument pPassword Password.
    @Argument pScope Array of scopes.
    @Argument pProperties The properties object for the current token request.
    @Output pStatus %Status indicating success or error in processing.
    @Output pUse2fa Boolean indicating whether two factor authentication should be used. This value is currently not updated by this implementation of this method.
    @Return Boolean indicator of successful or unsuccessful user validation.
  • Inherited Members

    Inherited Methods

    FeedbackOpens in a new tab