Method GetCredentialAsync
GetCredentialAsync(CredentialRequestInfo, Boolean)
Returns a Credential object of the specified type (credentialRequestInfo.AuthenticationType) that can be used to access the secured resource identified by the input url (credentialRequestInfo.Url). If required, the challenge method will be called and should return the expected credential object. If case of Token AuthenticationType, the user is typically challenged for a username and password which are used to generate a token. This method is typically called internally when a request fails due to an "invalid credentials" error.
Declaration
public Task<Credential> GetCredentialAsync(CredentialRequestInfo credentialRequestInfo, bool retry)
Parameters
Type | Name | Description |
---|---|---|
CredentialRequestInfo | credentialRequestInfo | The information about the credential to get. |
Boolean | retry | Indicates if the method should make additional attempts to get the credentials after a failure (i.e. if true, the challenge method will be called in any case) |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Credential> | The task object representing the asynchronous get credential operation. The value of the task result is a Credential object. |
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.15 |