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

Commit b059bcc

Browse files
authored
Obsolete AuthenticationManager (#866)
1 parent a78b194 commit b059bcc

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/Microsoft.AspNetCore.Http.Abstractions/Authentication/AuthenticationManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
namespace Microsoft.AspNetCore.Http.Authentication
1111
{
12+
[Obsolete("This is obsolete and will be removed in a future version. See https://go.microsoft.com/fwlink/?linkid=845470.")]
1213
public abstract class AuthenticationManager
1314
{
1415
/// <summary>

src/Microsoft.AspNetCore.Http/Authentication/DefaultAuthenticationManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Microsoft.AspNetCore.Http.Authentication.Internal
1313
{
14+
[Obsolete("This is obsolete and will be removed in a future version. See https://go.microsoft.com/fwlink/?linkid=845470.")]
1415
public class DefaultAuthenticationManager : AuthenticationManager
1516
{
1617
// Lambda hoisted to static readonly field to improve inlining https://github.com/dotnet/roslyn/issues/13624

src/Microsoft.AspNetCore.Http/DefaultHttpContext.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ public class DefaultHttpContext : HttpContext
2828

2929
private HttpRequest _request;
3030
private HttpResponse _response;
31+
32+
#pragma warning disable CS0618 // Type or member is obsolete
3133
private AuthenticationManager _authenticationManager;
34+
#pragma warning restore CS0618 // Type or member is obsolete
35+
3236
private ConnectionInfo _connection;
3337
private WebSocketManager _websockets;
3438

@@ -66,7 +70,9 @@ public virtual void Uninitialize()
6670
}
6771
if (_authenticationManager != null)
6872
{
73+
#pragma warning disable CS0618 // Type or member is obsolete
6974
UninitializeAuthenticationManager(_authenticationManager);
75+
#pragma warning restore CS0618 // Type or member is obsolete
7076
_authenticationManager = null;
7177
}
7278
if (_connection != null)
@@ -196,7 +202,9 @@ protected virtual void UninitializeHttpResponse(HttpResponse instance) { }
196202
protected virtual ConnectionInfo InitializeConnectionInfo() => new DefaultConnectionInfo(Features);
197203
protected virtual void UninitializeConnectionInfo(ConnectionInfo instance) { }
198204

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

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

0 commit comments

Comments
 (0)