Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Obsolete AuthenticationManager #866

Merged
merged 1 commit into from
Jun 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace Microsoft.AspNetCore.Http.Authentication
{
[Obsolete("This is obsolete and will be removed in a future version. See https://go.microsoft.com/fwlink/?linkid=845470.")]
public abstract class AuthenticationManager
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Microsoft.AspNetCore.Http.Authentication.Internal
{
[Obsolete("This is obsolete and will be removed in a future version. See https://go.microsoft.com/fwlink/?linkid=845470.")]
public class DefaultAuthenticationManager : AuthenticationManager
{
// Lambda hoisted to static readonly field to improve inlining https://github.com/dotnet/roslyn/issues/13624
Expand Down
8 changes: 8 additions & 0 deletions src/Microsoft.AspNetCore.Http/DefaultHttpContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ public class DefaultHttpContext : HttpContext

private HttpRequest _request;
private HttpResponse _response;

#pragma warning disable CS0618 // Type or member is obsolete
private AuthenticationManager _authenticationManager;
#pragma warning restore CS0618 // Type or member is obsolete

private ConnectionInfo _connection;
private WebSocketManager _websockets;

Expand Down Expand Up @@ -66,7 +70,9 @@ public virtual void Uninitialize()
}
if (_authenticationManager != null)
{
#pragma warning disable CS0618 // Type or member is obsolete
UninitializeAuthenticationManager(_authenticationManager);
#pragma warning restore CS0618 // Type or member is obsolete
_authenticationManager = null;
}
if (_connection != null)
Expand Down Expand Up @@ -196,7 +202,9 @@ protected virtual void UninitializeHttpResponse(HttpResponse instance) { }
protected virtual ConnectionInfo InitializeConnectionInfo() => new DefaultConnectionInfo(Features);
protected virtual void UninitializeConnectionInfo(ConnectionInfo instance) { }

[Obsolete("This is obsolete and will be removed in a future version. See https://go.microsoft.com/fwlink/?linkid=845470.")]
protected virtual AuthenticationManager InitializeAuthenticationManager() => new DefaultAuthenticationManager(this);
[Obsolete("This is obsolete and will be removed in a future version. See https://go.microsoft.com/fwlink/?linkid=845470.")]
protected virtual void UninitializeAuthenticationManager(AuthenticationManager instance) { }

protected virtual WebSocketManager InitializeWebSocketManager() => new DefaultWebSocketManager(Features);
Expand Down