From ee0c9dcf35145bab2f2a6fedbf8e9cf5875185db Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Tue, 18 Jun 2019 23:31:41 -0700 Subject: [PATCH] Get rid of Authentication.Internal (#11341) --- .../Cookies/src/CookieAuthenticationOptions.cs | 1 - ...oft.AspNetCore.Authentication.netcoreapp3.0.cs | 15 ++++++--------- .../Core/src/RemoteAuthenticationOptions.cs | 1 - .../RequestPathBaseCookieBuilder.cs | 2 +- .../OpenIdConnect/src/OpenIdConnectOptions.cs | 1 - 5 files changed, 7 insertions(+), 13 deletions(-) rename src/Security/Authentication/Core/src/{Internal => }/RequestPathBaseCookieBuilder.cs (95%) diff --git a/src/Security/Authentication/Cookies/src/CookieAuthenticationOptions.cs b/src/Security/Authentication/Cookies/src/CookieAuthenticationOptions.cs index 78156caecc..fc4edaa3dd 100644 --- a/src/Security/Authentication/Cookies/src/CookieAuthenticationOptions.cs +++ b/src/Security/Authentication/Cookies/src/CookieAuthenticationOptions.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNetCore.Authentication.Internal; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Http; diff --git a/src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.netcoreapp3.0.cs b/src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.netcoreapp3.0.cs index 6a2cfd1a9e..ac15a1853d 100644 --- a/src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.netcoreapp3.0.cs +++ b/src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.netcoreapp3.0.cs @@ -238,6 +238,12 @@ namespace Microsoft.AspNetCore.Authentication public System.Exception Failure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } + public partial class RequestPathBaseCookieBuilder : Microsoft.AspNetCore.Http.CookieBuilder + { + public RequestPathBaseCookieBuilder() { } + protected virtual string AdditionalPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public override Microsoft.AspNetCore.Http.CookieOptions Build(Microsoft.AspNetCore.Http.HttpContext context, System.DateTimeOffset expiresFrom) { throw null; } + } public abstract partial class ResultContext : Microsoft.AspNetCore.Authentication.BaseContext where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions { protected ResultContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, TOptions options) : base (default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(TOptions)) { } @@ -297,15 +303,6 @@ namespace Microsoft.AspNetCore.Authentication protected virtual void WriteIdentity(System.IO.BinaryWriter writer, System.Security.Claims.ClaimsIdentity identity) { } } } -namespace Microsoft.AspNetCore.Authentication.Internal -{ - public partial class RequestPathBaseCookieBuilder : Microsoft.AspNetCore.Http.CookieBuilder - { - public RequestPathBaseCookieBuilder() { } - protected virtual string AdditionalPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public override Microsoft.AspNetCore.Http.CookieOptions Build(Microsoft.AspNetCore.Http.HttpContext context, System.DateTimeOffset expiresFrom) { throw null; } - } -} namespace Microsoft.AspNetCore.Builder { public static partial class AuthAppBuilderExtensions diff --git a/src/Security/Authentication/Core/src/RemoteAuthenticationOptions.cs b/src/Security/Authentication/Core/src/RemoteAuthenticationOptions.cs index a843348067..4dd39ca16e 100644 --- a/src/Security/Authentication/Core/src/RemoteAuthenticationOptions.cs +++ b/src/Security/Authentication/Core/src/RemoteAuthenticationOptions.cs @@ -3,7 +3,6 @@ using System; using System.Net.Http; -using Microsoft.AspNetCore.Authentication.Internal; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Http; diff --git a/src/Security/Authentication/Core/src/Internal/RequestPathBaseCookieBuilder.cs b/src/Security/Authentication/Core/src/RequestPathBaseCookieBuilder.cs similarity index 95% rename from src/Security/Authentication/Core/src/Internal/RequestPathBaseCookieBuilder.cs rename to src/Security/Authentication/Core/src/RequestPathBaseCookieBuilder.cs index f42617cb23..2efc05c155 100644 --- a/src/Security/Authentication/Core/src/Internal/RequestPathBaseCookieBuilder.cs +++ b/src/Security/Authentication/Core/src/RequestPathBaseCookieBuilder.cs @@ -4,7 +4,7 @@ using System; using Microsoft.AspNetCore.Http; -namespace Microsoft.AspNetCore.Authentication.Internal +namespace Microsoft.AspNetCore.Authentication { /// /// A cookie builder that sets to the request path base. diff --git a/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectOptions.cs b/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectOptions.cs index 60adf0e0d1..e64bf37616 100644 --- a/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectOptions.cs +++ b/src/Security/Authentication/OpenIdConnect/src/OpenIdConnectOptions.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.IdentityModel.Tokens.Jwt; -using Microsoft.AspNetCore.Authentication.Internal; using Microsoft.AspNetCore.Authentication.OAuth.Claims; using Microsoft.AspNetCore.Http; using Microsoft.IdentityModel.Protocols;