Skip to content

Conversation

@abhix2112
Copy link
Contributor

This contribution introduces SmartAadhaar Toolkit, a complete package for Aadhaar verification within ServiceNow.

It is not just a Script Include — it combines:

Script Include wrapper (SmartAadhaar) for OTP-based, demographic, document, and status verification

RESTMessageV2 integration for secure API calls

Connection & Credential Alias (aadhaar_api) for endpoint + credential management

Why this is useful
Aadhaar verification is a common need for organizations onboarding users in India. Instead of re-writing REST calls each time, this toolkit provides a drop-in, reusable utility that follows ServiceNow best practices:

🔒 Security: no hardcoded secrets, input validation, masking of Aadhaar numbers

⚡ Reliability: retry logic, exponential backoff, error handling

🧾 Compliance: session management, consent tracking hooks, audit logging

🛠️ Flexibility: endpoints configurable per provider, works with any UIDAI-approved gateway

Folder placement
Per the contributing guidelines, the snippet is placed under:

Server-Side Components/
REST Integrations/
SmartAadhaar Toolkit/
README.md
SmartAadhaar.scriptinclude.js

This location reflects that it is a REST integration toolkit (Script Include + RESTMessageV2 + Connection & Credential Alias) rather than a standalone Script Include.

How to test

Configure a Connection & Credential Alias: aadhaar_api with your provider’s base URL + credentials.

Run the sample Background Script calls from README.md:

sendOtp() → user receives OTP

verifyOtp() → returns eKYC data

verifyDemographic() → returns match score

getDocument() → fetches Aadhaar XML/PDF

checkStatus() → checks verification status

Security note

No Aadhaar number or OTP is logged (masked in logs).

No credentials are hardcoded (all stored in Connection & Credential Alias).

Explicit consent tracking supported via helper params.

👉 This way, you show them:

It follows folder guidelines (moved into Server-Side Components/REST Integrations/SmartAadhaar Toolkit/).

It’s not just a Script Include but a Toolkit.

You included README + testing steps + security notes.

@snamjosh snamjosh assigned snamjosh and unassigned snamjosh Oct 14, 2025
@am-shakeel am-shakeel self-assigned this Oct 15, 2025
Copy link
Contributor

@am-shakeel am-shakeel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abhix2112, could you please delete this file(Specialized Areas/Fix scripts/updateMultipleRecords/README.md) as it is not related to this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abhix2112, could you please delete this file as it is not related to this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@am-shakeel have created new PR sorted the issue. sorry for inconvenience #2166

@am-shakeel
Copy link
Contributor

Thanks for your submission. It appears that this pull request contains more files than described in the title. Please review and update the pull request to either remove the extra/unintended files or to update the description to be more comprehensive. Ensure your contributions are meaningful and adhere to the project’s standards. [If applicable: You can create a new branch on your forked repository to avoid accidental inclusions of new commits in the future.]. Closing this for now. Once you make additional changes, feel free to re-open this Pull Request or create a new one.

@am-shakeel am-shakeel closed this Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants