Name
global.PwdGoogleAuthEnrollmentCheck
Description
An enrollment check that verifies a user has configured Google Authenticator through the system login
Script
var PwdGoogleAuthEnrollmentCheck = Class.create();
PwdGoogleAuthEnrollmentCheck.prototype = {
category: 'password_reset.extension.enrollment_check', // DO NOT REMOVE THIS LINE!
/**********
* Returns boolean telling whether the user is enrolled.
*
* @param params.enrolledUserId The sys-id of the user being checked (table: sys_user)
* @param params.verificationId [NOT USED] The sys-id of the verification being checked (table: pwd_verification)
* @return boolean telling whether the user is enrolled into the specified verification
**********/
process: function(params) {
return this.isEnrolled(params.verificationId, params.enrolledUserId);
},
/* eslint-disable no-unused-vars */
isEnrolled: function(verificationId, userId) {
return SNC.MultifactorAuthUtil.isValidatedForUser(userId);
},
/* eslint-enable */
type: 'PwdGoogleAuthEnrollmentCheck'
};
Sys ID
a1149eb787773200cfab6dd207cb0bc4