AzureAD / microsoft-identity-web

Helps creating protected web apps and web APIs with Microsoft identity platform and Azure AD B2C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make MicrosoftIdentityWebAppAuthenticationBuilder extensible by users

NetherGranite opened this issue · comments

Summary

Make MicrosoftIdentityWebAppAuthenticationBuilder extensible by making its OpenIdConnectScheme publicly gettable.

Motivation and goals

This solves #2638. Put simply, it is not currently possible to make extension methods for working with MicrosoftIdentityWebAppAuthenticationBuilder because its OpenID Connect scheme is private.

Risks / unknowns

There aren't any risks as far as I can tell. This simply exposes a value the developer passed to the builder themselves in the first place.

Examples

The following would become possible:

authenticationBuilder.AddMicrosoftIdentityWebApp(options => { }, "MySchemeName")
    .ConfigureClientSecretFromServices()
    .PreventSignIn();

Potential design

Change the following:

private string OpenIdConnectScheme { get; set; }

would become

public string OpenIdConnectScheme { get; private set; } 

See #2899.

This was merged in #2899.