簡體   English   中英

Jhipster 自動生成的 Java 應用程序中 JWT 身份驗證的順序是什么?

[英]What is the order of JWT Authentication in Jhipster autogenerated Java application?

我是 JWT 身份驗證的新手。 我可以使用默認管理員憑據來訪問 API。 他們中的大多數人都在哪里使用,但我不知道如何在應用程序中注冊和添加用戶。

有人有 postman collections 或者有人可以幫忙嗎?

以管理員用戶身份登錄網關 web 應用程序后,

選項 1 [OP 想要什么]

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. “用戶資源”部分應該包含您正在尋找的所有 Rest 端點及其定義。 來自此頁面的示例 curl 用於用戶創建,

 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\" ] }"

使用此頁面,您應該能夠獲得所需的一切。

選項 2

Go 到右上角的管理 -> 用戶管理菜單,您應該能夠添加/更新/刪除用戶。

觀看此視頻@1:45視頻鏈接

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM