标签:server request ddr col account 数据 add class client
令牌端点主要后台编程方式获取令牌的端点,可以获取JWT令牌和reference令牌
这里只讨论JWT令牌,包含用户数据信息
POSTMAN方式:
编程方式:
var client = new HttpClient(); var disco = await client.GetDiscoveryDocumentAsync("服务器基地址"); if (disco.IsError) throw new Exception(disco.Error); var response = await client.RequestPasswordTokenAsync(new PasswordTokenRequest { Address = disco.TokenEndpoint, ClientId = "roclient", ClientSecret = "secret", UserName = "bob", Password = "bob",
//下面可选 Scope = "resource1.scope1 resource2.scope1", Parameters = { { "acr_values", "tenant:custom_account_store1 foo bar quux" } } }); if (response.IsError) throw new Exception(response.Error); return response;
需要引用: IdentityModel
标签:server request ddr col account 数据 add class client
原文地址:https://www.cnblogs.com/myfqm/p/13156793.html