Skip to main content

%ZHSLIB.Login.LoginData

class %ZHSLIB.Login.LoginData extends %Library.RegisteredObject

Object to represent how a HealthShare login failure should be processed. LoginContext is the most important property for processing requests in a login page, as it captures the context needed by a login page or REST API to perform subsequent steps. See the documentation for individual properties to understand the various possibilities.

Property Inventory

Method Inventory

Parameters

parameter CONTEXTChallengeAvailable = challenge-available;
parameter CONTEXTChallengeResponse = challenge-response;
parameter CONTEXTChangePassword = change-password;

Properties

property ChallengeForLogin as %String);
When LoginContext = ..#CONTEXTChallengeAvailable, this property will contain the user that the challenge is for, and this value will need to be sent back to the server along with the answer to ChallengeQuestion to request a password reset.
Property methods: ChallengeForLoginDisplayToLogical(), ChallengeForLoginGet(), ChallengeForLoginIsValid(), ChallengeForLoginLogicalToDisplay(), ChallengeForLoginLogicalToOdbc(), ChallengeForLoginNormalize(), ChallengeForLoginSet()
property ChallengeQuestion as %String);
When LoginContext = ..#CONTEXTChallengeAvailable, this property will contain a challenge question that the user must answer correctly to request a password reset.
Property methods: ChallengeQuestionDisplayToLogical(), ChallengeQuestionGet(), ChallengeQuestionIsValid(), ChallengeQuestionLogicalToDisplay(), ChallengeQuestionLogicalToOdbc(), ChallengeQuestionNormalize(), ChallengeQuestionSet()
property ChallengeResponse as %String);
When LoginContext = ..#CONTEXTChallengeResponse, it indicates that the user has requested a password reset, and this message should be displayed to the user to communicate what occurred on the registry in response to the user's request. The message should be displayed to the user so that they understand what occurred.
Property methods: ChallengeResponseDisplayToLogical(), ChallengeResponseGet(), ChallengeResponseIsValid(), ChallengeResponseLogicalToDisplay(), ChallengeResponseLogicalToOdbc(), ChallengeResponseNormalize(), ChallengeResponseSet()
property LoginContext as %String (VALUELIST = ",challenge-available,challenge-response,change-password");
Helper property to indicate what information was identified in the login data. The supported values are as follows:
  • ..#CONTEXTChallengeAvailable - the login failed (so IsLoginError()() = 1 and LoginStatus is an error), but we have data available in ChallengeQuestion and ChallengeForLogin to allow the user to request a password reset.
  • ..#CONTEXTChallengeResponse - this value is returned from a password reset request, which is not treated as a login failure, but the caller should display the value of ChallengeResponse to the user.
  • ..#CONTEXTChangePassword - the user needs to change their password. This should only be returned when logins are being processed by a REST API or a similar CSP dispatch class, as standard CSP and Zen login pages automatically handle password change conditions by redirecting to the change password page for the current CSP application.
Property methods: LoginContextDisplayToLogical(), LoginContextGet(), LoginContextIsValid(), LoginContextLogicalToDisplay(), LoginContextLogicalToOdbc(), LoginContextNormalize(), LoginContextSet()
property LoginStatus as %Status [ InitialExpression = $$$OK ];
Status to capture the detailed status that was encountered, but does not provide much useful information. Callers should make use of IsLoginError()() and/or LoginContext to understand what happened with a login request.

This will almost always be $$$AccessDenied when it is a failure.

Property methods: LoginStatusGet(), LoginStatusIsValid(), LoginStatusLogicalToOdbc(), LoginStatusSet()

Methods

method IsLoginError() as %Boolean
Boolean flag to indicate whether a login error occurred.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab