Method GenerateCredentialAsync
GenerateCredentialAsync(Uri, String, String, GenerateTokenOptions)
Generates a token credential object asynchronously. You need to provide the service URI, the username and the password. This is a helper method typically called by the UI challenging the user.
Declaration
public Task<TokenCredential> GenerateCredentialAsync(Uri serviceUri, string userName, string password, GenerateTokenOptions generateTokenOptions = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | serviceUri | The service Uri. |
System.String | userName | The user name. |
System.String | password | The password. |
GenerateTokenOptions | generateTokenOptions | The optional infos concerning the token to generate (referer, credentials). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TokenCredential> | The task object representing the asynchronous generate credential operation. The value of the task result is a TokenCredential object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | serviceUri |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.14 |
GenerateCredentialAsync(Uri, GenerateTokenOptions)
Generates a token credential object asynchronously. You need to provide the service URL. This is a helper method typically called by the UI challenging the user.
Declaration
public Task<TokenCredential> GenerateCredentialAsync(Uri serviceUri, GenerateTokenOptions generateTokenOptions = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | serviceUri | The URL. |
GenerateTokenOptions | generateTokenOptions | The optional infos concerning the token to generate (referer, credentials). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TokenCredential> | The task object representing the asynchronous generate credential operation. The value of the task result is a TokenCredential object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | serviceUri |
See Also
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.14 |