コード例 #1
0
        public static async Task <TokenResponse> GetRothschildHouseTokenAsync(RothschildHouseIdentitySettings settings)
        {
            using (var client = new HttpClient())
            {
                var disco = await client.GetDiscoveryDocumentAsync(settings.Url);

                return(await client.RequestPasswordTokenAsync(new PasswordTokenRequest
                {
                    Address = disco.TokenEndpoint,
                    ClientId = settings.ClientId,
                    ClientSecret = settings.ClientSecret,
                    UserName = settings.UserName,
                    Password = settings.Password
                }));
            }
        }
コード例 #2
0
 public RothschildHouseIdentityClient(IOptions <RothschildHouseIdentitySettings> settings)
 {
     Settings = settings.Value;
 }