eGov OTP Service
Overview
OTP Service is a core service that is available on the DIGIT platform. The service is used to authenticate the users on the platform. The functionality is exposed via REST API.
Pre-requisites
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
Key Functionalities
egov-otp is called internally by the user-otp service which fetches the mobileNumber and feeds it to egov-otp to generate 'n' digit OTP.
Deployment Details
Deploy the latest version of egov-otp service.
Add Role-Action mapping for APIs.
Configuration Details
Below properties define the OTP configurations
a) egov.otp.length
: Number of digits in the OTP
b) egov.otp.ttl
: Controls the validity time frame of the OTP. The default value is 900 seconds. Another OTP generated within this time frame is also allowed.
c) egov.otp.encrypt
: Controls if the OTP is encrypted and stored in the table.
Integration Details
Integration Scope
The egov-otp service is used to authenticate the user in the platform.
Integration Benefits
Can perform user authentication without impacting the other module.
In the future, this application can be used in a standalone manner in any other platform that requires a user authentication system.
Steps to Integration
To integrate, a host of egov-otp modules should be overwritten in the helm chart.
/otp/v1/_create
should be added as the create endpoint. Create OTP Configuration this API is an internal call from v1/_send endpoint. This endpoint is present in the user-otp service and hence explicit calls are not needed./otp/v1/_validate
should be added as the validate endpoint. OTP Configuration this endpoint validates the OTP with respect to the mobile number./otp/v1/_search
should be added as the search endpoint. This API searches the mobile number and OTP using the uuid. The uuid nothing but the OTP reference number.
Reference Docs
Doc Links
Title | Link |
API Swagger Documentation |
API Details
BasePath
/egov-otp/v1
Egov-otp service APIs - contains create, validate and search endpoint
a) POST /otp/v1/_create
- create OTP Configuration this API is an internal call from v1/_send endpoint. This endpoint is present in the user-otp service and hence there is no need for any explicit calls.
b) POST /otp/v1/_validate
- validate OTP Configuration this endpoint is to validate the OTP with respect to the mobile number.
c) POST /otp/v1/_search
- search the mobile number and OTP using uuid. The uuid is the OTP reference number.
Last updated