fix 使用域名请求
This commit is contained in:
@@ -28,7 +28,7 @@ public class OAuth2Controller : ControllerBase
|
||||
{
|
||||
var authority = _identityServerOption.Value.Authority;
|
||||
|
||||
var httpClient = _httpClientFactory.CreateClient("oauth2");
|
||||
var httpClient = _httpClientFactory.CreateClient();
|
||||
|
||||
var content = new StringContent($"grant_type=client_credentials&client_id={request.ClientId}&client_secret={request.ClientSecret}&scope={request.Scope}", Encoding.UTF8, "application/x-www-form-urlencoded");
|
||||
var response = await httpClient.PostAsync($"{authority}/connect/token", content);
|
||||
|
||||
Reference in New Issue
Block a user