Skip to main content

HS.HC.OAuth2.Server.Installer

class HS.HC.OAuth2.Server.Installer

API methods for configuring an IRIS OAuth authorization server.

Method Inventory

Parameters

parameter SSLConfigName = OAuth2.SSLConfig;

Methods

classmethod ConfigureAuthServer(Output pIssuerURL As %String, pHost As %String, pPort As %String, pPathPrefix As %String, pOverwrite As %Boolean = 0) as %Boolean
@API.Method
Set up the IRIS OAuth server in the current instance.
@Argument pIssuerURL The issuer URL as understood by the configured OAuth server, returned by this method.
@Argument pHost Host name.
@Argument pPort Port number.
@Argument pPathPrefix Web server prefix.
@Argument pOverwrite When an OAuth server already exists: If 0, then Throw an error. If 1, then delete the server configuration and its clients before proceeding.
@Return Boolean value indicating whether this method configured a server or not. If pOverwrite was 0 and a server configuration already exists then this method does not do anything and returns 0. Otherwise it returns 1 upon successful configure. If an error is incurred while configuring, then this method Throws an exception.
classmethod ConfigureInternalOAuthServer(pOverwrite As %Boolean = 0) as %Status
Utility method for setting up the OAuth server in the local IRIS instance. The server configuration is set up with starter values determined entirely by this installer class. This method does not set up OAuth clients.

If the pOverwrite input parameter is not specified as 1 or not specified at all, an existing OAuth server configuration will not be overwritten.

Executing this method from the IRIS Terminal command line requires user privilege to write to the IRISSYS database.
classmethod DoesOAuthServerExist() as %Boolean
@API.Method
Return a Boolean value indicating whether an OAuth Server Configuration (the server-side server) exists in this IRIS for Health instance.
classmethod SetCustomizationSettings(ByRef pServer As %RegisteredObject = $$$NULLOREF, ByRef pNewClassNames, pNewNamespace As %String, pNewRoles As %String, pSaveServer As %Boolean = 0, ByRef pMessages)
@API.Method
Update the IRIS OAuth server customization settings.

If customization values are not passed in, then defaults defined by this class will be used.

This method updates the settings only when it appears safe to do so. This means that it does not change existing implemented customizations if doing so appears that it will cause problems.
This method may be called from within this class, or may be called directly from outside this class. To provide for the latter case, the pMessages array of text strings is returned in case the caller wants to display and/or log informational messages about this update.
@Argument pServer Optional input of IRIS OAuth server object. If not provided, it will be retrieved from existing storage.
@Argument pNewClassNames Optional array of class names to use for productized customization.
@Argument pNewNamepace Optional namespace to use for running customization classes.
@Argument pNewRoles Optional roles to which to escalate when running customization classes.
@Argument pSaveServer Boolean flag to toggle doing server Save() at the end of this method call.
@Argument pMessages (Output) Array of informational message strings about the processing of this method. None of the messages is intended to convey a fatal error, which would be returned via thrown fatal error. Structure of the array is: messages(integer index starting at 1) = text
FeedbackOpens in a new tab