Skip to main content

Definition

Assembly: CloudNimble.EasyAF.Data.EF6.dll Namespace: CloudNimble.EasyAF.Data Inheritance: Microsoft.Data.SqlClient.SqlAuthenticationProvider

Syntax

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

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

Returns

Type: bool True if the authentication method is ActiveDirectoryDeviceCodeFlow; otherwise, false.