Skip to main content

%ZHSLIB.Login.Utils

abstract class %ZHSLIB.Login.Utils

General class to contain login-related APIs to simplify the process of setting up server-side data to handle login failures and password changes.

Method Inventory

Methods

classmethod CheckLoginRequest(Output pLoginData As %ZHSLIB.Login.LoginData, pCSPRequest As %CSP.Request = $get(%request), pCSPSession As %CSP.Session = $get(%session), pClearRequestError As %Boolean = 0) as %Status
API to wrap checks for login pages to work out whether a login failed, and whether there are any values related to HealthShare logins that should drive the page's behaviour.

The API returns a %ZHSLIB.Login.LoginData instance that indicates what happened on the previous incoming request, particularly when there was some sort of failure on the previous request.

The arguments to the method are as follows:
  • pLoginData - the object that indicates what the state of the login was.
  • pCSPRequest - the incoming %CSP.Request instance, which defaults to %request.
  • pCSPSession - the current %CSP.Session instance, which defaults to %session.
  • pClearRequestError - a flag to control whether the Error:ErrorCode field in the request object should be removed in cases where there should not be an error reported to downstream code.

classmethod GatherChangePasswordData(pCSPSession As %CSP.Session = "") as %Status
API to be called from a change password page to correctly initialize the server-side data to support the subsequent password change request.
FeedbackOpens in a new tab