5

Earlier we used

app.UseWindowsAzureActiveDirectoryBearerAuthentication(
            new WindowsAzureActiveDirectoryBearerAuthenticationOptions
            {
                Audience = ConfigurationManager.AppSettings["ida:Audience"],
                Tenant = ConfigurationManager.AppSettings["ida:Tenant"],

            });

to authenticate with Azure. Problem is that today we did an upgrade to ASP.NET 5 RC1-FINAL and now this method does not exist anymore.

I have searched the net for other solutions, but the ones I have found is using some 3rd part identity service or .UseOAuthBearerAuthentication which is not available in RC1-Final.

1 Answer 1

6

This extension method - specific to AAD - has not been ported to vNext. Instead, you're encouraged to directly use the JWT bearer middleware:

app.UseJwtBearerAuthentication(options => {
    options.AutomaticAuthenticate = true;
    options.AutomaticChallenge = true;
    options.Authority = "https://login.windows.net/tratcheroutlook.onmicrosoft.com";
    options.Audience = "63a87a83-64b9-4ac1-b2c5-092126f8474f";
});
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.