Skip to content

Deprecated Authentication property from HttpContext removed in ASP.NET Core #14732

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

Closed
JunTaoLuo opened this issue Sep 27, 2019 · 0 comments · Fixed by #15044
Closed

Deprecated Authentication property from HttpContext removed in ASP.NET Core #14732

JunTaoLuo opened this issue Sep 27, 2019 · 0 comments · Fixed by #15044
Assignees
Labels
breaking-change Indicates a .NET Core breaking change

Comments

@JunTaoLuo
Copy link

JunTaoLuo commented Sep 27, 2019

Deprecated Authentication property from HttpContext removed in ASP.NET Core

As part of dotnet/aspnetcore#6504 we've removed the deprecated Authentication property on HttpContext. The Authentication property has been deprecated since 2.0 and a migration guide was published to migrate code using this deprecated property to the new replacement APIs. In addition, we have also removed all of the remaining unused classes/apis related to the old 1.x authentication stack in dotnet/aspnetcore@d7a7c65.

Please discuss this change on dotnet/aspnetcore#6533

Version introduced

3.0

Old behavior

These APIs were available since 1.0 and were deprecated in 2.0.

New behavior

These APIs have been removed in 3.0

Reason for change

The old 1.0 APIs have been replaced by extension methods in the Microsoft.AspNetCore.Authentication namespace. The new API is documented here.

Recommended action

The migration guide is available here.

Category

  • ASP.NET Core

Affected APIs

HttpContext.Authentication

// Classes
Microsoft.AspNetCore.Http.Authentication.AuthenticationManager
Microsoft.AspNetCore.Http.Authentication.AuthenticateInfo
Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
Microsoft.AspNetCore.Http.Features.Authentication.AuthenticateContext
Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext
Microsoft.AspNetCore.Http.Features.Authentication.ChallengeBehavior
Microsoft.AspNetCore.Http.Features.Authentication.DescribeSchemesContext
Microsoft.AspNetCore.Http.Features.Authentication.IAuthenticationHandler
Microsoft.AspNetCore.Http.Features.Authentication.SignInContext
Microsoft.AspNetCore.Http.Features.Authentication.SignOutContext

// Property
Microsoft.AspNetCore.Http.Features.Authentication.IHttpAuthenticationFeature.Handler property

Issue metadata

  • Issue type: breaking-change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates a .NET Core breaking change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants