Skip to content

Conversation

@cheenamalhotra
Copy link
Member

@cheenamalhotra cheenamalhotra commented Jun 10, 2020

This PR adds support for "Device Code Flow" authentication mode with MSAL.NET.
Reference documentation: OAuth2.0 Device Authorization Grant flow

Example of Connection string:

Server=<server>.database.windows.net; Authentication=Active Directory Device Code Flow; Database=Northwind;

Also enables customization of Device Code Flow callback with below API:
ActiveDirectoryAuthenticationProvider.SetDeviceCodeFlowCallback(Func<DeviceCodeResult, Task> deviceCodeFlowCallbackMethod)

Edit:

Added new APIs as under to enable customizations for "Active Directory Interactive" authentication experience:

  • ActiveDirectoryAuthenticationProvider.SetIWin32WindowFunc(Func<IWin32Window> iWin32WindowFunc)
    -- Applies to .NET Framework only
  • ActiveDirectoryAuthenticationProvider.SetParentActivityOrWindowFunc(Func<object> parentActivityOrWindowFunc)
    -- Applies to .NET Standard only
  • ActiveDirectoryAuthenticationProvider.SetCustomWebUi(ICustomWebUi customWebUi)
    -- Applies to .NET Framework, .NET Core and .NET Standard

Co-authored-by: David Engel <dengel@magnitude.com>
@cheenamalhotra cheenamalhotra added the Public API 🆕 Issues/PRs that introduce new APIs to the driver. label Jun 11, 2020
Copy link
Contributor

@saurabh500 saurabh500 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from API perspective.

@cheenamalhotra cheenamalhotra removed this from the 2.0.0 milestone Jun 12, 2020
cheenamalhotra and others added 2 commits July 20, 2020 13:09
Co-authored-by: David Engel <dengel@magnitude.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Public API 🆕 Issues/PRs that introduce new APIs to the driver.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants