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.
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
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.
Deploy the latest version of egov-otp service.
Add Role-Action mapping for APIs.
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.
The egov-otp service is used to authenticate the user in the platform.
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.
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.
Title
Link
API Swagger Documentation
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.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.