Show / Hide Table of Contents

Class PasswordHttpClient

The implementation of an access token service for client credentials based on IdentityServer4.

Inheritance
System.Object
PasswordHttpClient
Implements
IIdentityServerHttpClient
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Geko.HttpClientService.Infrastructure
Assembly: Geko.HttpClientService.dll
Syntax
public class PasswordHttpClient : IIdentityServerHttpClient

Constructors

| Improve this Doc View Source

PasswordHttpClient(HttpClient)

Constructor of the ClientCredentialsHttpClient.

Declaration
public PasswordHttpClient(HttpClient httpClient)
Parameters
Type Name Description
HttpClient httpClient

An that will execute the request

Properties

| Improve this Doc View Source

HttpClientOptionsType

The type of the IIdentityServerOptions implementation that this HttpClient needs

Declaration
public Type HttpClientOptionsType { get; }
Property Value
Type Description
Type

Methods

| Improve this Doc View Source

GetCacheKey(IIdentityServerOptions)

Creates a unique key to be used as the cache key of the Identity Server access token, by combining infomration from the access token options object. See Geko.HttpClientService.Models.PasswordOptions for the access token options.

Declaration
public string GetCacheKey(IIdentityServerOptions options)
Parameters
Type Name Description
IIdentityServerOptions options

The token service options

Returns
Type Description
System.String

Returns a string representing a unique identifier to be used as the caching key, by getting the hashcode of the address, the client, the username and the scopes.

| Improve this Doc View Source

GetTokenResponseAsync(IIdentityServerOptions)

Retrieves a IdentityModel.Client.TokenResponse from the configured by the options.

Declaration
public async Task<TokenResponse> GetTokenResponseAsync(IIdentityServerOptions options)
Parameters
Type Name Description
IIdentityServerOptions options

The Geko.HttpClientService.Models.PasswordOptions for the IdentityServer4.

Returns
Type Description
Task<IdentityModel.Client.TokenResponse>

A IdentityModel.Client.TokenResponse object.

Implements

IIdentityServerHttpClient
  • Improve this Doc
  • View Source
Back to top Generated by DocFX