0

I am new to JWT authentication. I can use the default Admin credentials for accessing the API's. Where most of them use, but I don't how to register and add a user within the application.

Do someone have a postman collections or can someone help to with the flow?

Manu C Rajan
  • 153
  • 1
  • 2
  • 13

1 Answers1

0

After you login to Gateway web application as an admin user,

Option 1 [What OP wants]

Go to Administration -> API Menu which will bring you to the swagger documentation page and then select the default definition on the top right drop down. The 'user-resource' section should have all the Rest end points you are looking for with its definitions. Sample curl from this page for user creation,

 curl -X POST "http://localhost:8080/api/users" -H "accept: */*" -H "Content-Type: application/json" -H "Authorization: Bearer xcxcxcx.xcxcxcxc.xcxcxcxc" -d "{ \"login\": \"sampleUser\", \"firstName\": \"Sample\", \"lastName\": \"User\", \"email\": \"sampleUser@localhost\", \"imageUrl\": \"\", \"activated\": true, \"langKey\": \"en\", \"createdBy\": \"system\", \"createdDate\": null, \"lastModifiedBy\": \"system\", \"lastModifiedDate\": null, \"authorities\": [ \"ROLE_USER\", \"ROLE_ADMIN\" ] }"

Using this page you should be able to get all that you need.

Option 2

Go to Administration -> User Management Menu on the top right and you should be able to add/update/delete users.

See this video @1:45 video link

Dwaraka
  • 179
  • 8