Skip to main content

HS.HC.OAuth2.Server.Validate

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

This class overrides API methods from the IRIS product class %OAuth2.Server.Validate to provide logic for fulfilling requirements of HL7 SMART on FHIR.

Method Inventory

Methods

classmethod ValidateUser(username As %Library.String, password As %Library.String, scope As %Library.ArrayOfDataTypes, properties As %OAuth2.Server.Properties, Output sc As %Library.Status, Output use2fa As %Library.Boolean = 0) as %Boolean
Inherited description: Your custom ValidateUser method must return true (1) only if the username and password refer to a valid user based on whatever criteria you choose to implement. It must return false in other cases.

If password="", then the user is already logged into an existing session and the password does not need to be validated.

In addition, this method receives the properties array and can further modify it; this correspond to the Properties property of %OAuth2.Server.Token. The authorization server will always add the "iss" (URL of authorization server), "sub" (client_id), and "exp" (expiration time in seconds since December 31st, 1840) to ClaimValues and "client_id" (client_id of the requesting client) to CusotmProperties after return from ValidateUser if they have not already been added.

This sample ValidateUser method validates the user based on the users for this instance. Set the use2fa output parameter to 1 (true) to indicate two factor authentication should be used. In this case the authenticate page will ask the user to enter a security code, which will be validated by Validate2FA().

Inherited Members

Inherited Methods

FeedbackOpens in a new tab