Skip to main content

HS.BulkFHIR.API.AuthAdapter

class HS.BulkFHIR.API.AuthAdapter extends HS.BulkFHIR.API.AdapterBase, %CSP.REST

Base class for all auth adapters. Subclasses must extend this class, uniquely identify themselves, and implement the abstract methods. Then they may be used for auth tasks within a BFC.

Method Inventory

Parameters

parameter IsOAuth;
Whether the adapter uses OAuth access tokens. Used in conjunction with the storage adapter to set the requireAccessToken setting in a status request.

Methods

abstract classmethod Authenticate(pBFCconfig As HS.BulkFHIR.API.Data.Config, pUrl As %String, ByRef pContinue As %Boolean) as %Status
@API.Overridable
Authentication method to be called from the BFC Rest Handler OnPreDispatch. Ensures that the request is authenticated. If authentication fails then this method must set pContinue=0 before returning. This method will be invoked on any HTTP request to the BFC Rest Handler, whether it is a kickoff request, search, or request for status. The CSP %request and %response objects are available to this method.
@Input pUrl Portion of the request URL that follows the base URL.
@Output pContinue Flag indicating whether to continue with DispatchClass processing.
@Returns %Status.
classmethod AuthorizeFHIRRequest(pRequest As HS.FHIRServer.API.Data.Request, pBFCconfig As HS.BulkFHIR.API.Data.Config)
@API.Overridable
Called on any FHIR request (search or operation), this API does any additional checking necessary to verify that the request user is authorized for the current request.
@Input pRequest FHIR request object representing an interaction, eg. export or search
@Input pBFCconfig BFC configuration for the current BFC endpoint.
@Throws if request is not allowed, eg. $$$ThrowFHIR($$$HttpOnlyResponse(401))
classmethod GetAccessTokenInfo(pBFCconfig As HS.BulkFHIR.API.Data.Config, pTokenString As %String) as %DynamicObject
@API.Overridable
If using OAuth, this method is expected to return selected information about the OAuth access token, if any, that is on the request to the BFC.
@Input pBFCconfig Full BFC configuration object in effect for the current BFC session.
@Input pTokenString Encoded string representation of an access token provided on the current request to the BFC.
@Returns a %DynamicObject representing the access token information.
classmethod Initialize(pBFCConfig As HS.BulkFHIR.API.Data.Config)
@API.Overridable
Called when the BFC is first configured and again if that configuration is changed, this method may be used to do any implementation-specific setup.
classmethod WellKnownConfiguration(pBFCconfig As HS.BulkFHIR.API.Data.Config) as %DynamicObject
@API.Overridable
If using OAuth, this method is expected to return the information from the baseURL/.well-known/smart-configuration query on the BFC endpoint.
@Input pBFCconfig Full BFC configuration object in effect for the current BFC endpoint.
@Returns a %DynamicObject representing the .well-known/smart-configuration for an endpoint.

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab