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 |
---|---|---|
System.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 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.2 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.0 - 200.5 |
Xamarin.Android | 100.0 - 100.14 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.5 |
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 |
---|---|---|
System.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 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.2 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.0 - 200.5 |
Xamarin.Android | 100.0 - 100.14 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.5 |