AuthenticatorClient
Namespace: Meshmakers.Octo.Sdk.ServiceClient.Authentication
Implementation of the client proxy for authentication.
public class AuthenticatorClient : AuthorizationClient, IAuthorizationClient, IAuthenticatorClient
Inheritance Object → AuthorizationClient → AuthenticatorClient
Implements IAuthorizationClient, IAuthenticatorClient
Constructors
AuthenticatorClient(IOptionsMonitor<AuthenticatorOptions>)
Constructor.
public AuthenticatorClient(IOptionsMonitor<AuthenticatorOptions> options)
Parameters
options IOptionsMonitor<AuthenticatorOptions>
Options for configuration of the client proxy.
Methods
EnsureAuthenticatedAsync(String, String)
public Task<EnsureAuthenticatedData> EnsureAuthenticatedAsync(string refreshToken, string accessToken)
Parameters
refreshToken String
accessToken String
Returns
RequestClientCredentialsTokenAsync(ApiScopes, DefaultScopes, IEnumerable<String>, String, String)
public Task<AuthenticationData> RequestClientCredentialsTokenAsync(ApiScopes apiScopes, DefaultScopes defaultScopes, IEnumerable<string> customScopes, string clientId, string clientSecret)
Parameters
apiScopes ApiScopes
defaultScopes DefaultScopes
customScopes IEnumerable<String>
clientId String
clientSecret String
Returns
BuildClientCredentialsTokenRequest(String, String, String, String, String)
Builds the client-credentials token request. Extracted for unit testing of the
acr_values injection and parameter mapping; the actual HTTP call is the
small wrapper above.
internal static ClientCredentialsTokenRequest BuildClientCredentialsTokenRequest(string tokenEndpoint, string clientId, string clientSecret, string scope, string tenantId)
Parameters
tokenEndpoint String
clientId String
clientSecret String
scope String
tenantId String
Returns
ClientCredentialsTokenRequest
RequestDeviceAuthorizationAsync(ApiScopes, IEnumerable<String>)
public Task<DeviceAuthenticationRequestData> RequestDeviceAuthorizationAsync(ApiScopes apiScopes, IEnumerable<string> customScopes)
Parameters
apiScopes ApiScopes
customScopes IEnumerable<String>
Returns
Task<DeviceAuthenticationRequestData>
RequestDeviceTokenAsync(String)
public Task<DeviceAuthenticationData> RequestDeviceTokenAsync(string deviceCode)
Parameters
deviceCode String
Returns
Task<DeviceAuthenticationData>
RequestPasswordTokenAsync(String, String, ApiScopes, IEnumerable<String>)
public Task<AuthenticationData> RequestPasswordTokenAsync(string username, string password, ApiScopes apiScopes, IEnumerable<string> customScopes)
Parameters
username String
password String
apiScopes ApiScopes
customScopes IEnumerable<String>
Returns
RefreshTokenAsync(String)
public Task<AuthenticationData> RefreshTokenAsync(string refreshToken)
Parameters
refreshToken String