1、浏览器请求
http://localhost:9096/authorize?client_id=test_client_1&response_type=code&scope=all&state=xyz&redirect_uri=http://localhost:9093/cb
2、302跳转,返回code
http://localhost:9093/cb?code=XUNKO4OPPROWAPFKEWNZWA&state=xyz
3、使用code交换token 出现如下错误
{"error":"unsupported_grant_type","error_description":"The authorization grant type is not supported by the authorization server"}
axios 请求代码如下: code 是返回的 code
http({ method: 'post', url: '/api2/token', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, auth: { 'username': 'test_client_1', 'password': 'test_secret_1', }, data: { 'grant_type': 'authorization_code', 'code': code, 'redirect_uri': 'http://localhost:8080/user/login' } })
1、浏览器请求
http://localhost:9096/authorize?client_id=test_client_1&response_type=code&scope=all&state=xyz&redirect_uri=http://localhost:9093/cb
2、302跳转,返回code
http://localhost:9093/cb?code=XUNKO4OPPROWAPFKEWNZWA&state=xyz
3、使用code交换token 出现如下错误
{"error":"unsupported_grant_type","error_description":"The authorization grant type is not supported by the authorization server"}
axios 请求代码如下: code 是返回的 code
http({ method: 'post', url: '/api2/token', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, auth: { 'username': 'test_client_1', 'password': 'test_secret_1', }, data: { 'grant_type': 'authorization_code', 'code': code, 'redirect_uri': 'http://localhost:8080/user/login' } })