Definition
Assembly: CloudNimble.EasyAF.Data.EF6.dll Namespace: CloudNimble.EasyAF.Data Inheritance: Microsoft.Data.SqlClient.SqlAuthenticationProviderSyntax
Summary
Provides a custom authentication method that gets a SqlAuthenticationToken from Azure Identity for the executing context.Constructors
.ctor
Syntax
Methods
AcquireTokenAsync Override
Request token from the provider using the specified SqlAuthenticationParameters. Uses DefaultAzureCredential to obtain an access token for SQL Database authentication.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
parameters | Microsoft.Data.SqlClient.SqlAuthenticationParameters | The authentication parameters from SQL Client. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.Data.SqlClient.SqlAuthenticationToken>
A SqlAuthenticationToken containing the access token and expiration time.
IsSupported Override
Returns a flag indicating if the requested SqlAuthenticationMethod is supported by this custom SqlAuthenticationProvider. This provider supports ActiveDirectoryDeviceCodeFlow authentication method.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
authenticationMethod | Microsoft.Data.SqlClient.SqlAuthenticationMethod | The authentication method to check for support. |
Returns
Type:bool
True if the authentication method is ActiveDirectoryDeviceCodeFlow; otherwise, false.