Method CreateAsync
CreateAsync(Uri, String, String, TimeSpan, CancellationToken)
Creates a Access
Declaration
public static Task<AccessTokenCredential> CreateAsync(Uri url, string username, string password, TimeSpan tokenExpirationInterval = default(TimeSpan), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
url | The URL of the token-secured resource. |
System. |
username | The username used to access the secured resource or retrieve a token. |
System. |
password | The password used to access the secured resource or retrieve a token. |
System. |
tokenExpirationInterval | The duration the token will remain valid.
The value must be greater than System. |
System. |
cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System. |
Returns a Access |
Remarks
The expiration resolution is whole minutes and seconds will be ignored.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 200.6 |
.NET | 200.6 |
.NET Windows | 200.6 |
.NET Android | 200.6 |
.NET iOS | 200.6 |
.NET Framework | 200.6 |
UWP | 200.6 |