Class LegacyUsernamePasswordApiClient
Inheritance
LegacyUsernamePasswordApiClient
Assembly: Aydsko.iRacingData.dll
Syntax
public class LegacyUsernamePasswordApiClient : IAuthenticatingHttpClient, IDisposable
Constructors
LegacyUsernamePasswordApiClient(HttpClient, iRacingDataClientOptions, CookieContainer, ILogger<LegacyUsernamePasswordApiClient>)
Declaration
public LegacyUsernamePasswordApiClient(HttpClient httpClient, iRacingDataClientOptions options, CookieContainer cookieContainer, ILogger<LegacyUsernamePasswordApiClient> logger)
Parameters
Fields
isLoggedIn
Declaration
protected bool isLoggedIn
Field Value
Methods
ClearLoggedInState()
Declaration
public void ClearLoggedInState()
Dispose()
Declaration
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type |
Name |
Description |
| bool |
disposing |
|
EnsureLoggedInAsync(CancellationToken)
Will ensure the client is authenticated by checking the isLoggedIn property and executing the login process if required.
Declaration
protected Task EnsureLoggedInAsync(CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| CancellationToken |
cancellationToken |
A token to allow the operation to be cancelled.
|
Returns
| Type |
Description |
| Task |
A Task that resolves when the process is complete.
|
SendAsync(HttpRequestMessage, HttpCompletionOption, CancellationToken)
Declaration
public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead, CancellationToken cancellationToken = default)
Parameters
Returns
SendAuthenticatedRequestAsync(HttpRequestMessage, HttpCompletionOption, CancellationToken)
Declaration
public Task<HttpResponseMessage> SendAuthenticatedRequestAsync(HttpRequestMessage request, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead, CancellationToken cancellationToken = default)
Parameters
Returns
UseUsernameAndPassword(string, string, bool)
Declaration
[Obsolete("Configure via the \"AddIRacingDataApi\" extension method on the IServiceCollection which allows you to configure the \"iRacingDataClientOptions\".")]
public void UseUsernameAndPassword(string username, string password, bool passwordIsEncoded)
Parameters
Implements