{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":48522,"path":"servicenow-platform/password-reset/c_InstalledPasswordResetScripts.md","title":"Password Reset script includes","bundle":null,"doc_type":null,"release":"australia","body":"\n# Password Reset script includes\n\nThe Password Reset plugin installs script includes that implement password reset processes. To enable you to extend functionality, each base-system script include provides extension points that you can use to invoke \"extension scripts\" that you customized.\n\nThe [extension script category](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/password-reset/pw-reset-extension-script.md) refers to the specific types of behavior for an extension script \\(for example, credential store, verification, identification type, or as a post-processor\\).\n\n## 'Enrollment check' script includes\n\nAll enrollment check script includes take the following parameters and return a boolean indicating whether the user is enrolled for Password Reset.\n\n-   params.userId: The sys\\_id of the user being checked \\(table: \\[sys\\_user\\]\\).\n-   params.verificationId: The sys\\_id of the verification being checked \\(table: \\[pwd\\_verification\\]\\).\n\n|Name|Description|\n|----|-----------|\n|PwdAlwaysEnrolled|Default check of whether a user is enrolled that always returns true.|\n|PwdMockIsEnrolled|Default check of whether a user is enrolled that always returns true.|\n|PwdQuestionsEnrollmentCheck|Determines whether a user has enrolled for Password Reset using security question verification.|\n|PwdSMSEnrollmentCheck|Determines whether a user has enrolled for Password Reset using SMS verification.|\n\n## 'Identification form processor' script includes\n\nIdentification form processor script includes provide functionality for extending identification processing.\n\nAll identification form processor script includes take the following parameters, and return the sys\\_id of the user that corresponds to the requested input. If the user was not identified, it returns null.\n\n-   params.processId: The sys\\_id of the calling Password Reset process \\(table: \\[pwd\\_process\\]\\).\n-   param request: The form request object. Fields in the form can be accessed with request.getParameter\\('&lt;element-id&gt;'\\). The supported request parameter is sysparm\\_user\\_id, the user identifier value entered in the form.\n\n|Name|Description|\n|----|-----------|\n|PwdIdentifyViaEmail|Verifies a user's identity by checking the email address.|\n|PwdIdentifyViaUsername|Verifies a user's identity by checking the user name.|\n\n## 'Enrollment form processor' script includes\n\nEnrollment form processor script includes provide functionality for extending enrollment form processing.\n\nAll enrollment form processor script includes take the following parameters, and return a boolean indicating whether the user was successfully enrolled.\n\n-   params.userId: The sys\\_id of the user trying to enroll \\(table: \\[sys\\_user\\]\\).\n-   params.verificationId: The sys\\_id of the verification used to enroll \\(table: \\[pwd\\_verification\\]\\).\n-   params.enrollmentId: The sys\\_id of this enrollment process.\n-   request: The form request object. Fields in the form can be accessed with request.getParameter\\('&lt;element-id&gt;'\\).\n\nYou should add the following information to the state of the enrollment process:\n\n-   gs.getSession\\(\\).putProperty\\(\"result.status\",status\\): Whether the user was successfully enrolled.\n-   gs.getSession\\(\\).putProperty\\(\"result.message\",message\\): An associated message to be returned to the UI, such as a detailed error message.\n-   gs.getSession\\(\\).putProperty\\(\"result.value\",value\\): A custom value associated with the enrollment.\n\n|Name|Description|\n|----|-----------|\n|PwdEnrollQuestionsProcessor|Handles questions and answers for verification.|\n|PwdEnrollSampleProcessor|Provides an enrollment processor for sample verification.|\n|PwdEnrollSMSProcessor|Provides an enrollment processor for SMS verification.|\n\n## 'User account lookup' script includes\n\nUser account lookup script includes return the credential store account\\_id for a given user.\n\nThe following parameter returns the credential store account\\_id for a given user. params.userId: The sys\\_id of the user being checked \\(table: \\[sys\\_user\\]\\).\n\n|Name|Description|\n|----|-----------|\n|PwdDefaultUserAccountLookup|Provides a default script for user account lookup from a user\\_id to the account in a credential store. The default mapping is to use the user name as the account name.|\n\n## 'Password generator' script includes\n\nPassword generator script includes take the following parameter, and return an auto-generated string password.\n\nparams.credentialStoreId: The sys\\_id of the calling Password Reset process \\(table: \\[pwd\\_process\\]\\).\n\n|Name|Description|\n|----|-----------|\n|PwdDefaultAutoGenPassword|Generates a password from a random word and 4 digits.|\n\n## 'Verification processor' script includes\n\nIf the user identity is verified, the verification processor script includes return `true`.\n\nVerification processor script includes take the following parameters:\n\n-   params.resetRequestId: The sys\\_id of the current Password Reset request \\(table: \\[pwd\\_reset\\_request\\]\\).\n-   params.userId: The sys\\_id of the user to be verified \\(table: \\[sys\\_user\\]\\).\n-   params.verificationId: The sys\\_id of the verification \\(table: \\[pwd\\_verification\\]\\).\n-   request: The form request object. Access the fields in the form with request.getParameter\\('&lt;element-id&gt;'\\).\n\n|Name|Description|\n|----|-----------|\n|PwdVerifyPersonalDataConfirmationProcess|Verifies that the user accepts the answer.|\n|PwdVerifyPersonalDataProcessor|Verifies that the user's answers match the expected data in the system.|\n|PwdVerifyQuestionsProcessor|Provides question and answer verification of user input on the second page of the verification form.|\n|PwdVerifySimpleProcessor|Provides simple verification of user input on the second page of the verification form.|\n|PwdVerifySMSProcessor|Provides SMS verification of user input on the second page of the verification form.|\n\n## 'Post processor' script includes\n\nPost processor script includes execute custom actions after the Password Reset process has completed.\n\nAll post processor script includes take the following parameters.\n\n-   params.resetRequestId: The sys\\_id of the current Password Reset request \\(table: \\[pwd\\_reset\\_request\\]\\).\n-   params.wfSuccess: A flag indicating whether the workflow completed successfully: True if, and only if, successful.\n\n|Name|Description|\n|----|-----------|\n|PwdPostProcessor|Executes actions after the process completes for success, failure, or both conditions.|\n\n**Related topics**  \n\n\n[Using extension points to extend application functionality](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/web-services/extension-points.md)\n\n[Using scripted extension points in server-side scripts](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/web-services/scripted-extension-points.md)\n\n[Using UI extension points in server-side UI macros](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/web-services/ui-extension-points.md)\n\n[Using client extension points in client-side UI scripting](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/web-services/client-extension-points.md)\n\n"}}