DIGIT CORE
Search…
User Module
Creating users on DIGIT post installation

Creating users

Run the kubectl port-forwarding of the egov-user service from Kubernetes cluster to your localhost. This gives you access to egov-user service directly bypassing Zuul auth and you can now interact with the User API directly.
kubectl port-forward svc/egov-user 8080:8080 -n egov
You will see below text in the Terminal:
Forwarding from 127.0.0.1:8080 -> 8080 Forwarding from [::1]:8080 -> 8080
Ensure you have installed the Postman utility to run the following scripts. If not, Install postman on your local machine. Import the collection into Postman. Create an environment variable for “tenantId” and set its value to your tenant.
The collection creates four types of users and also provides a way to refresh the auth token:
  • Super User
  • System User
  • Citizen
  • Anonymous User
Run all the scripts in order.
The refresh auth token script logs into the server and refreshes the token. A sample script is provided for the employee user. Similar scripts can be copied for the citizen/super user etc..for convenience.

Sample Json Object

{
"userName": "systemuser", Can it be changed: Yes
"name": "systemuser", Can it be changed: Yes
"gender": null, Can it be changed: Yes
"mobileNumber": "9999999999", Can it be changed: Yes
"type": "SYSTEM", Can it be changed: No
"active": true, Can it be changed: No
"password": "[email protected]", Can it be changed: Yes
"roles": [ Can it be changed: No
{
"name": "Employee",
"code": "EMPLOYEE",
"tenantId": "pg"
},
{
"name": "System user",
"code": "SYSTEM",
"tenantId": "pg"
}
],
"tenantId": "pg" Can it be changed: No
}
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Copy link
On this page