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 })); } }
public RothschildHouseIdentityClient(IOptions <RothschildHouseIdentitySettings> settings) { Settings = settings.Value; }