Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Arc4u 6.1.18.x+) Consider rewriting BlazorMsalTokenProvider not to use internal Microsoft interfaces #83

Open
vvdb-architecture opened this issue Oct 20, 2023 · 0 comments

Comments

@vvdb-architecture
Copy link
Contributor

Currently, BlazorMsalTokenProvider uses an internal interface called IAccessTokenProviderAccessor . This interface is accessible but internal to Microsoft's implementation and therefore subject to change. See the source:

namespace Microsoft.AspNetCore.Components.WebAssembly.Authentication.Internal
{
    /// <summary>
    /// This is an internal API that supports the Microsoft.AspNetCore.Components.WebAssembly.Authentication
    /// infrastructure and not subject to the same compatibility standards as public APIs.
    /// It may be changed or removed without notice in any release.
    /// </summary>
    public interface IAccessTokenProviderAccessor
    {
        /// <summary>
        /// This is an internal API that supports the Microsoft.AspNetCore.Components.WebAssembly.Authentication
        /// infrastructure and not subject to the same compatibility standards as public APIs.
        /// It may be changed or removed without notice in any release.
        /// </summary>
        IAccessTokenProvider TokenProvider { get; }
    }
}

There is an equivalent public interface called IAccessTokenProvider. This does exactly the same thing and is public.

In BlazorMsalTokenProvider it's a drop-in replacement and you need to change the namespace to:

using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant