SecureBlackbox 2020 Node.js Edition

Questions / Feedback?

StartAuth Method

Initiates an authentication process.

Syntax

authenticator.startAuth(userID, [callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

Call this method to start an authentication process for UserID.

The authentication process may consist of multiple atomic steps. Each step represents a single authentication transaction, such as provision of a password, a PIN, or a one-time token. The exact authentication step sequence for the user is chosen according to the following rules:

  • If the user is found in the Users database, all authentication methods specified for that user are activated;
  • otherwise, the methods assigned to DefaultAuthMethods are activated;
  • AuthStart event is thrown, allowing the application to tune up the selection of authentication methods if needed.
  • the first method from the list is initiated.

This method may return one of the three results:

arAuthFurtherAuthNeeded0
arAuthSucceeded1
arAuthFailed2

The authentication succeeded result is returned if the authentication method selection procedure completed with an empty method list. A typical result of this method though is further authentication required, which indicates that the next authentication method has kicked off. Use rpAuthInfo; property to find out which authentication method should be used on this step, and solicit the relevant authentication token from the user. Pass the received token to the ContinueAuth method for validation.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 Node.js Edition - Version 20.0 [Build 8165]