Sa-OAuth2 模块密码式新增 client_secret 参数校验

This commit is contained in:
click33
2022-08-23 16:43:17 +08:00
parent 31462217b4
commit 9d6ce502c1
5 changed files with 40 additions and 8 deletions

View File

@@ -94,6 +94,7 @@ public class SaOAuthClientController {
String str = OkHttps.sync(serverUrl + "/oauth2/token")
.addBodyPara("grant_type", "password")
.addBodyPara("client_id", clientId)
.addBodyPara("client_secret", clientSecret)
.addBodyPara("username", username)
.addBodyPara("password", password)
.post()

View File

@@ -76,7 +76,7 @@
账号:<input name="username">
密码:<input name="password">
<button onclick="passwordLogin()">登录</button>
<code>http://sa-oauth-server.com:8001/oauth2/token?grant_type=password&client_id={value}&username={value}&password={value}</code>
<code>http://sa-oauth-server.com:8001/oauth2/token?grant_type=password&client_id={value}&client_secret={value}&username={value}&password={value}</code>
<br>
<h3>模式四凭证式Client Credentials</h3>