修改备注
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c713d0bc95
commit
71e6099bbd
|
@ -444,18 +444,16 @@ namespace IRaCIS.Api.Controllers
|
|||
var opts = new RestClientOptions(baseUrl);
|
||||
using var client = new RestClient(opts);
|
||||
|
||||
//https://bump.sh/logto/doc/logto-management-api/authentication
|
||||
var request = new RestRequest("oidc/token", Method.Post);
|
||||
request
|
||||
.AddHeader("Content-Type", "application/x-www-form-urlencoded")
|
||||
.AddParameter("grant_type", "client_credentials")
|
||||
.AddParameter("client_id", appId)
|
||||
.AddParameter("client_secret", appSecret)
|
||||
.AddParameter("resource", apiAddress); //必须在界面上配置
|
||||
|
||||
if (scope is not null)
|
||||
{
|
||||
request.AddParameter("scope", scope);
|
||||
}
|
||||
.AddParameter("resource", apiAddress) //注意这里默认值地址和api 地址有区别
|
||||
.AddParameter("scope", scope);
|
||||
|
||||
|
||||
var response = await client.ExecuteAsync<LogtoTokenResponse>(request);
|
||||
|
||||
|
|
Loading…
Reference in New Issue