Reacting to CoreCLR package changes
This commit is contained in:
parent
9361960b2f
commit
22d133cefa
|
|
@ -1,7 +1,6 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Authentication.Cookies
|
namespace Microsoft.AspNetCore.Authentication.Cookies
|
||||||
|
|
@ -25,21 +24,18 @@ namespace Microsoft.AspNetCore.Authentication.Cookies
|
||||||
/// The default value used by CookieAuthenticationMiddleware for the
|
/// The default value used by CookieAuthenticationMiddleware for the
|
||||||
/// CookieAuthenticationOptions.LoginPath
|
/// CookieAuthenticationOptions.LoginPath
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Login", Justification = "By design")]
|
|
||||||
public static readonly PathString LoginPath = new PathString("/Account/Login");
|
public static readonly PathString LoginPath = new PathString("/Account/Login");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The default value used by CookieAuthenticationMiddleware for the
|
/// The default value used by CookieAuthenticationMiddleware for the
|
||||||
/// CookieAuthenticationOptions.LogoutPath
|
/// CookieAuthenticationOptions.LogoutPath
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Logout", Justification = "By design")]
|
|
||||||
public static readonly PathString LogoutPath = new PathString("/Account/Logout");
|
public static readonly PathString LogoutPath = new PathString("/Account/Logout");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The default value used by CookieAuthenticationMiddleware for the
|
/// The default value used by CookieAuthenticationMiddleware for the
|
||||||
/// CookieAuthenticationOptions.AccessDeniedPath
|
/// CookieAuthenticationOptions.AccessDeniedPath
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Login", Justification = "By design")]
|
|
||||||
public static readonly PathString AccessDeniedPath = new PathString("/Account/AccessDenied");
|
public static readonly PathString AccessDeniedPath = new PathString("/Account/AccessDenied");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||||
using Microsoft.AspNetCore.DataProtection;
|
using Microsoft.AspNetCore.DataProtection;
|
||||||
|
|
@ -103,13 +102,11 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// LoginPath grants a new SignIn identity, the ReturnUrlParameter value is used to redirect the browser back
|
/// LoginPath grants a new SignIn identity, the ReturnUrlParameter value is used to redirect the browser back
|
||||||
/// to the url which caused the original unauthorized status code.
|
/// to the url which caused the original unauthorized status code.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Login", Justification = "By design")]
|
|
||||||
public PathString LoginPath { get; set; }
|
public PathString LoginPath { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If the LogoutPath is provided the middleware then a request to that path will redirect based on the ReturnUrlParameter.
|
/// If the LogoutPath is provided the middleware then a request to that path will redirect based on the ReturnUrlParameter.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Logout", Justification = "By design")]
|
|
||||||
public PathString LogoutPath { get; set; }
|
public PathString LogoutPath { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -124,7 +121,6 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// string parameter looked for when a request arrives on the login path or logout path, in order to return to the
|
/// string parameter looked for when a request arrives on the login path or logout path, in order to return to the
|
||||||
/// original url after the action is performed.
|
/// original url after the action is performed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Justification = "ReturnUrl is the name of a querystring parameter")]
|
|
||||||
public string ReturnUrlParameter { get; set; }
|
public string ReturnUrlParameter { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Http.Authentication;
|
using Microsoft.AspNetCore.Http.Authentication;
|
||||||
|
|
@ -20,7 +19,6 @@ namespace Microsoft.AspNetCore.Authentication.Cookies
|
||||||
/// <param name="options">The cookie middleware options</param>
|
/// <param name="options">The cookie middleware options</param>
|
||||||
/// <param name="redirectUri">The initial redirect URI</param>
|
/// <param name="redirectUri">The initial redirect URI</param>
|
||||||
/// <param name="properties">The <see cref="AuthenticationProperties"/>.</param>
|
/// <param name="properties">The <see cref="AuthenticationProperties"/>.</param>
|
||||||
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "2#", Justification = "Represents header value")]
|
|
||||||
public CookieRedirectContext(HttpContext context, CookieAuthenticationOptions options, string redirectUri, AuthenticationProperties properties)
|
public CookieRedirectContext(HttpContext context, CookieAuthenticationOptions options, string redirectUri, AuthenticationProperties properties)
|
||||||
: base(context, options)
|
: base(context, options)
|
||||||
{
|
{
|
||||||
|
|
@ -31,7 +29,6 @@ namespace Microsoft.AspNetCore.Authentication.Cookies
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets the URI used for the redirect operation.
|
/// Gets or Sets the URI used for the redirect operation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Justification = "Represents header value")]
|
|
||||||
public string RedirectUri { get; set; }
|
public string RedirectUri { get; set; }
|
||||||
|
|
||||||
public AuthenticationProperties Properties { get; }
|
public AuthenticationProperties Properties { get; }
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
using Microsoft.AspNetCore.Authentication.OAuth;
|
using Microsoft.AspNetCore.Authentication.OAuth;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
|
@ -16,7 +15,6 @@ namespace Microsoft.AspNetCore.Authentication.Google
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An ASP.NET Core middleware for authenticating users using Google OAuth 2.0.
|
/// An ASP.NET Core middleware for authenticating users using Google OAuth 2.0.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Middleware are not disposable.")]
|
|
||||||
public class GoogleMiddleware : OAuthMiddleware<GoogleOptions>
|
public class GoogleMiddleware : OAuthMiddleware<GoogleOptions>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
|
|
@ -17,7 +16,6 @@ namespace Microsoft.AspNetCore.Authentication.OAuth
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An ASP.NET Core middleware for authenticating users using OAuth services.
|
/// An ASP.NET Core middleware for authenticating users using OAuth services.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Middleware are not disposable.")]
|
|
||||||
public class OAuthMiddleware<TOptions> : AuthenticationMiddleware<TOptions> where TOptions : OAuthOptions, new()
|
public class OAuthMiddleware<TOptions> : AuthenticationMiddleware<TOptions> where TOptions : OAuthOptions, new()
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
|
|
@ -32,7 +31,6 @@ namespace Microsoft.AspNetCore.Authentication.OpenIdConnect
|
||||||
/// <param name="sharedOptions"></param>
|
/// <param name="sharedOptions"></param>
|
||||||
/// <param name="options"></param>
|
/// <param name="options"></param>
|
||||||
/// <param name="htmlEncoder">The <see cref="HtmlEncoder"/>.</param>
|
/// <param name="htmlEncoder">The <see cref="HtmlEncoder"/>.</param>
|
||||||
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Managed by caller")]
|
|
||||||
public OpenIdConnectMiddleware(
|
public OpenIdConnectMiddleware(
|
||||||
RequestDelegate next,
|
RequestDelegate next,
|
||||||
IDataProtectionProvider dataProtectionProvider,
|
IDataProtectionProvider dataProtectionProvider,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.IdentityModel.Tokens.Jwt;
|
using System.IdentityModel.Tokens.Jwt;
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||||
|
|
@ -45,7 +44,6 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// <para>UseTokenLifetime: false.</para>
|
/// <para>UseTokenLifetime: false.</para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="authenticationScheme"> will be used to when creating the <see cref="System.Security.Claims.ClaimsIdentity"/> for the AuthenticationScheme property.</param>
|
/// <param name="authenticationScheme"> will be used to when creating the <see cref="System.Security.Claims.ClaimsIdentity"/> for the AuthenticationScheme property.</param>
|
||||||
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Owin.Security.OpenIdConnect.OpenIdConnectOptions.set_Caption(System.String)", Justification = "Not a LOC field")]
|
|
||||||
public OpenIdConnectOptions(string authenticationScheme)
|
public OpenIdConnectOptions(string authenticationScheme)
|
||||||
{
|
{
|
||||||
AuthenticationScheme = authenticationScheme;
|
AuthenticationScheme = authenticationScheme;
|
||||||
|
|
@ -124,8 +122,6 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// Gets or sets the 'post_logout_redirect_uri'
|
/// Gets or sets the 'post_logout_redirect_uri'
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>This is sent to the OP as the redirect for the user-agent.</remarks>
|
/// <remarks>This is sent to the OP as the redirect for the user-agent.</remarks>
|
||||||
[SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Justification = "By design")]
|
|
||||||
[SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Logout", Justification = "This is the term used in the spec.")]
|
|
||||||
public string PostLogoutRedirectUri { get; set; }
|
public string PostLogoutRedirectUri { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Microsoft.AspNetCore.Http.Authentication;
|
using Microsoft.AspNetCore.Http.Authentication;
|
||||||
|
|
||||||
|
|
@ -20,7 +19,6 @@ namespace Microsoft.AspNetCore.Authentication.Twitter
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="model">The token to serialize</param>
|
/// <param name="model">The token to serialize</param>
|
||||||
/// <returns>A byte array containing the serialized token</returns>
|
/// <returns>A byte array containing the serialized token</returns>
|
||||||
[SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times", Justification = "Dispose is idempotent")]
|
|
||||||
public virtual byte[] Serialize(RequestToken model)
|
public virtual byte[] Serialize(RequestToken model)
|
||||||
{
|
{
|
||||||
using (var memory = new MemoryStream())
|
using (var memory = new MemoryStream())
|
||||||
|
|
@ -39,7 +37,6 @@ namespace Microsoft.AspNetCore.Authentication.Twitter
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data">A byte array containing the serialized token</param>
|
/// <param name="data">A byte array containing the serialized token</param>
|
||||||
/// <returns>The Twitter request token</returns>
|
/// <returns>The Twitter request token</returns>
|
||||||
[SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times", Justification = "Dispose is idempotent")]
|
|
||||||
public virtual RequestToken Deserialize(byte[] data)
|
public virtual RequestToken Deserialize(byte[] data)
|
||||||
{
|
{
|
||||||
using (var memory = new MemoryStream(data))
|
using (var memory = new MemoryStream(data))
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
|
|
@ -17,7 +16,6 @@ namespace Microsoft.AspNetCore.Authentication.Twitter
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ASP.NET Core middleware for authenticating users using Twitter.
|
/// ASP.NET Core middleware for authenticating users using Twitter.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Middleware are not disposable.")]
|
|
||||||
public class TwitterMiddleware : AuthenticationMiddleware<TwitterOptions>
|
public class TwitterMiddleware : AuthenticationMiddleware<TwitterOptions>
|
||||||
{
|
{
|
||||||
private readonly HttpClient _httpClient;
|
private readonly HttpClient _httpClient;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Microsoft.AspNetCore.Http.Authentication;
|
using Microsoft.AspNetCore.Http.Authentication;
|
||||||
|
|
||||||
|
|
@ -15,7 +14,6 @@ namespace Microsoft.AspNetCore.Authentication
|
||||||
|
|
||||||
public static PropertiesSerializer Default { get; } = new PropertiesSerializer();
|
public static PropertiesSerializer Default { get; } = new PropertiesSerializer();
|
||||||
|
|
||||||
[SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times", Justification = "Dispose is idempotent")]
|
|
||||||
public virtual byte[] Serialize(AuthenticationProperties model)
|
public virtual byte[] Serialize(AuthenticationProperties model)
|
||||||
{
|
{
|
||||||
using (var memory = new MemoryStream())
|
using (var memory = new MemoryStream())
|
||||||
|
|
@ -29,7 +27,6 @@ namespace Microsoft.AspNetCore.Authentication
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times", Justification = "Dispose is idempotent")]
|
|
||||||
public virtual AuthenticationProperties Deserialize(byte[] data)
|
public virtual AuthenticationProperties Deserialize(byte[] data)
|
||||||
{
|
{
|
||||||
using (var memory = new MemoryStream(data))
|
using (var memory = new MemoryStream(data))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue