- 进入Clients菜单,选择Client ID
- 找到Access settings =》Direct access grants
将Direct access grants勾选 - Postmans URL输入地址:{IP}:{prot}/realms/{ realms }/protocol/openid-connect/token
例:http://10.18.11.3:31873/realms/master/protocol/openid-connect/token http://10.18.11.3:31873/realms/master/protocol/openid-connect/tokenBody 参数:
client_id:系统里面的 client_id
grant_type:授权方式
username:用户名
password:密码
-
获取用户信息
地址 {IP}:{prot}/realms/{ realms }/protocol/openid-connect /userinfo
例:http://10.18.11.3:31873/realms/master/protocol/openid-connect/userinfo
Headers{
Authorization:“Bearer ”+ 上面获取到的access_token
Content-Type: application/json
}
05-19
6387