Obsolete AuthenticationManager (#866)
This commit is contained in:
parent
a78b194a84
commit
b059bcc426
|
|
@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Http.Features.Authentication;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Authentication
|
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
|
public abstract class AuthenticationManager
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Http.Features.Authentication;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Authentication.Internal
|
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
|
public class DefaultAuthenticationManager : AuthenticationManager
|
||||||
{
|
{
|
||||||
// Lambda hoisted to static readonly field to improve inlining https://github.com/dotnet/roslyn/issues/13624
|
// Lambda hoisted to static readonly field to improve inlining https://github.com/dotnet/roslyn/issues/13624
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,11 @@ namespace Microsoft.AspNetCore.Http
|
||||||
|
|
||||||
private HttpRequest _request;
|
private HttpRequest _request;
|
||||||
private HttpResponse _response;
|
private HttpResponse _response;
|
||||||
|
|
||||||
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
private AuthenticationManager _authenticationManager;
|
private AuthenticationManager _authenticationManager;
|
||||||
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
|
|
||||||
private ConnectionInfo _connection;
|
private ConnectionInfo _connection;
|
||||||
private WebSocketManager _websockets;
|
private WebSocketManager _websockets;
|
||||||
|
|
||||||
|
|
@ -66,7 +70,9 @@ namespace Microsoft.AspNetCore.Http
|
||||||
}
|
}
|
||||||
if (_authenticationManager != null)
|
if (_authenticationManager != null)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
UninitializeAuthenticationManager(_authenticationManager);
|
UninitializeAuthenticationManager(_authenticationManager);
|
||||||
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
_authenticationManager = null;
|
_authenticationManager = null;
|
||||||
}
|
}
|
||||||
if (_connection != null)
|
if (_connection != null)
|
||||||
|
|
@ -196,7 +202,9 @@ namespace Microsoft.AspNetCore.Http
|
||||||
protected virtual ConnectionInfo InitializeConnectionInfo() => new DefaultConnectionInfo(Features);
|
protected virtual ConnectionInfo InitializeConnectionInfo() => new DefaultConnectionInfo(Features);
|
||||||
protected virtual void UninitializeConnectionInfo(ConnectionInfo instance) { }
|
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);
|
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 void UninitializeAuthenticationManager(AuthenticationManager instance) { }
|
||||||
|
|
||||||
protected virtual WebSocketManager InitializeWebSocketManager() => new DefaultWebSocketManager(Features);
|
protected virtual WebSocketManager InitializeWebSocketManager() => new DefaultWebSocketManager(Features);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue