From d78f7edfc7d3084c430eb129e3d6b8f703ff8eb9 Mon Sep 17 00:00:00 2001 From: Eilon Lipton Date: Tue, 8 Mar 2016 00:22:33 -0800 Subject: [PATCH] Fix package metadata And also a few other Core-related renames. --- README.md | 7 +++--- .../project.json | 9 +++++-- .../FacebookMiddleware.cs | 2 +- .../project.json | 9 +++++-- .../GoogleMiddleware.cs | 2 +- .../project.json | 9 +++++-- .../project.json | 9 +++++-- .../MicrosoftAccountMiddleware.cs | 2 +- .../project.json | 9 +++++-- .../OAuthMiddleware.cs | 4 ++-- .../project.json | 7 +++++- .../OpenIdConnectMiddleware.cs | 6 ++--- .../project.json | 9 +++++-- .../TwitterMiddleware.cs | 4 ++-- .../project.json | 7 +++++- .../project.json | 7 +++++- .../project.json | 6 ++++- .../project.json | 7 ++++-- .../project.json | 24 ++++++++++++------- .../CookieInteropTests.cs | 4 ++-- 20 files changed, 101 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 02e65225c1..f32798072d 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,11 @@ AppVeyor: [![AppVeyor](https://ci.appveyor.com/api/projects/status/fujhh8n956v5o Travis: [![Travis](https://travis-ci.org/aspnet/Security.svg?branch=dev)](https://travis-ci.org/aspnet/Security) -ASP.NET Security contains the security and authorization middlewares for ASP.NET 5. - -This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo. +Contains the security and authorization middlewares for ASP.NET Core. ### Notes ASP.NET Security will not include Basic Authentication middleware due to its potential insecurity and performance problems. If you host under IIS you can enable it via IIS configuration. If you require Basic Authentication middleware for testing purposes, as a shared secret authentication mechanism for server to server communication, or to use a database as a user source then please look at the samples from [leastprivilege](https://github.com/leastprivilege/BasicAuthentication.AspNet5) or [Kukkimonsuta](https://github.com/Kukkimonsuta/Odachi/tree/master/src/Odachi.AspNetCore.Authentication.Basic). + + +This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo. diff --git a/src/Microsoft.AspNetCore.Authentication.Cookies/project.json b/src/Microsoft.AspNetCore.Authentication.Cookies/project.json index 0029e6a897..b1148ce00c 100644 --- a/src/Microsoft.AspNetCore.Authentication.Cookies/project.json +++ b/src/Microsoft.AspNetCore.Authentication.Cookies/project.json @@ -1,6 +1,11 @@ { "version": "1.0.0-*", - "description": "ASP.NET middleware that enables an application to use cookie based authentication, similar to ASP.NET's forms authentication.", + "description": "ASP.NET Core middleware that enables an application to use cookie based authentication.", + "tags": [ + "aspnetcore", + "authentication", + "security" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" @@ -17,7 +22,7 @@ "Microsoft.Extensions.WebEncoders": "1.0.0-*" }, "frameworks": { - "net451": {}, + "net451": { }, "netstandard1.3": { "imports": [ "dotnet5.4" diff --git a/src/Microsoft.AspNetCore.Authentication.Facebook/FacebookMiddleware.cs b/src/Microsoft.AspNetCore.Authentication.Facebook/FacebookMiddleware.cs index e4a76e0e93..ac57e8ddeb 100644 --- a/src/Microsoft.AspNetCore.Authentication.Facebook/FacebookMiddleware.cs +++ b/src/Microsoft.AspNetCore.Authentication.Facebook/FacebookMiddleware.cs @@ -14,7 +14,7 @@ using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.Authentication.Facebook { /// - /// An ASP.NET middleware for authenticating users using Facebook. + /// An ASP.NET Core middleware for authenticating users using Facebook. /// public class FacebookMiddleware : OAuthMiddleware { diff --git a/src/Microsoft.AspNetCore.Authentication.Facebook/project.json b/src/Microsoft.AspNetCore.Authentication.Facebook/project.json index 3cd595a96e..2fe5040003 100644 --- a/src/Microsoft.AspNetCore.Authentication.Facebook/project.json +++ b/src/Microsoft.AspNetCore.Authentication.Facebook/project.json @@ -1,6 +1,11 @@ { "version": "1.0.0-*", - "description": "ASP.NET 5 middleware that enables an application to support Facebook's OAuth 2.0 authentication workflow.", + "description": "ASP.NET Core middleware that enables an application to support Facebook's OAuth 2.0 authentication workflow.", + "tags": [ + "aspnetcore", + "authentication", + "security" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" @@ -15,7 +20,7 @@ "Microsoft.AspNetCore.Authentication.OAuth": "1.0.0-*" }, "frameworks": { - "net451": {}, + "net451": { }, "netstandard1.3": { "imports": [ "dotnet5.4", diff --git a/src/Microsoft.AspNetCore.Authentication.Google/GoogleMiddleware.cs b/src/Microsoft.AspNetCore.Authentication.Google/GoogleMiddleware.cs index 190dc4b25a..ba6fb7d2ef 100644 --- a/src/Microsoft.AspNetCore.Authentication.Google/GoogleMiddleware.cs +++ b/src/Microsoft.AspNetCore.Authentication.Google/GoogleMiddleware.cs @@ -14,7 +14,7 @@ using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.Authentication.Google { /// - /// An ASP.NET middleware for authenticating users using Google OAuth 2.0. + /// An ASP.NET Core middleware for authenticating users using Google OAuth 2.0. /// [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Middleware are not disposable.")] public class GoogleMiddleware : OAuthMiddleware diff --git a/src/Microsoft.AspNetCore.Authentication.Google/project.json b/src/Microsoft.AspNetCore.Authentication.Google/project.json index 702d45aefd..ed29e86ae4 100644 --- a/src/Microsoft.AspNetCore.Authentication.Google/project.json +++ b/src/Microsoft.AspNetCore.Authentication.Google/project.json @@ -1,6 +1,11 @@ { "version": "1.0.0-*", - "description": "ASP.NET 5 contains middlewares to support Google's OpenId and OAuth 2.0 authentication workflows.", + "description": "ASP.NET Core contains middleware to support Google's OpenId and OAuth 2.0 authentication workflows.", + "tags": [ + "aspnetcore", + "authentication", + "security" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" @@ -15,7 +20,7 @@ "Microsoft.AspNetCore.Authentication.OAuth": "1.0.0-*" }, "frameworks": { - "net451": {}, + "net451": { }, "netstandard1.3": { "imports": [ "dotnet5.4", diff --git a/src/Microsoft.AspNetCore.Authentication.JwtBearer/project.json b/src/Microsoft.AspNetCore.Authentication.JwtBearer/project.json index 091deca827..e86e914152 100644 --- a/src/Microsoft.AspNetCore.Authentication.JwtBearer/project.json +++ b/src/Microsoft.AspNetCore.Authentication.JwtBearer/project.json @@ -1,6 +1,11 @@ { "version": "1.0.0-*", - "description": "ASP.NET 5 middleware that enables an application to receive an OpenID Connect bearer token.", + "description": "ASP.NET Core middleware that enables an application to receive an OpenID Connect bearer token.", + "tags": [ + "aspnetcore", + "authentication", + "security" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" @@ -16,7 +21,7 @@ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "2.0.0-*" }, "frameworks": { - "net451": {}, + "net451": { }, "netstandard1.3": { "imports": [ "dotnet5.4", diff --git a/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount/MicrosoftAccountMiddleware.cs b/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount/MicrosoftAccountMiddleware.cs index fc9866826b..3ad1bf5571 100644 --- a/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount/MicrosoftAccountMiddleware.cs +++ b/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount/MicrosoftAccountMiddleware.cs @@ -13,7 +13,7 @@ using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.Authentication.MicrosoftAccount { /// - /// An ASP.NET middleware for authenticating users using the Microsoft Account service. + /// An ASP.NET Core middleware for authenticating users using the Microsoft Account service. /// public class MicrosoftAccountMiddleware : OAuthMiddleware { diff --git a/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount/project.json b/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount/project.json index e0a2fceb0d..7507e1eb4c 100644 --- a/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount/project.json +++ b/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount/project.json @@ -1,6 +1,11 @@ { "version": "1.0.0-*", - "description": "ASP.NET 5 middleware that enables an application to support the Microsoft Account authentication workflow.", + "description": "ASP.NET Core middleware that enables an application to support the Microsoft Account authentication workflow.", + "tags": [ + "aspnetcore", + "authentication", + "security" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" @@ -15,7 +20,7 @@ "Microsoft.AspNetCore.Authentication.OAuth": "1.0.0-*" }, "frameworks": { - "net451": {}, + "net451": { }, "netstandard1.3": { "imports": [ "dotnet5.4", diff --git a/src/Microsoft.AspNetCore.Authentication.OAuth/OAuthMiddleware.cs b/src/Microsoft.AspNetCore.Authentication.OAuth/OAuthMiddleware.cs index 1a16d2aa3b..7ef1863226 100644 --- a/src/Microsoft.AspNetCore.Authentication.OAuth/OAuthMiddleware.cs +++ b/src/Microsoft.AspNetCore.Authentication.OAuth/OAuthMiddleware.cs @@ -15,7 +15,7 @@ using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.Authentication.OAuth { /// - /// An ASP.NET middleware for authenticating users using OAuth services. + /// An ASP.NET Core middleware for authenticating users using OAuth services. /// [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Middleware are not disposable.")] public class OAuthMiddleware : AuthenticationMiddleware where TOptions : OAuthOptions, new() @@ -112,7 +112,7 @@ namespace Microsoft.AspNetCore.Authentication.OAuth } Backchannel = new HttpClient(Options.BackchannelHttpHandler ?? new HttpClientHandler()); - Backchannel.DefaultRequestHeaders.UserAgent.ParseAdd("Microsoft ASP.NET OAuth middleware"); + Backchannel.DefaultRequestHeaders.UserAgent.ParseAdd("Microsoft ASP.NET Core OAuth middleware"); Backchannel.Timeout = Options.BackchannelTimeout; Backchannel.MaxResponseContentBufferSize = 1024 * 1024 * 10; // 10 MB diff --git a/src/Microsoft.AspNetCore.Authentication.OAuth/project.json b/src/Microsoft.AspNetCore.Authentication.OAuth/project.json index b8f056facb..978dea7cc7 100644 --- a/src/Microsoft.AspNetCore.Authentication.OAuth/project.json +++ b/src/Microsoft.AspNetCore.Authentication.OAuth/project.json @@ -1,6 +1,11 @@ { "version": "1.0.0-*", - "description": "ASP.NET 5 middleware that enables an application to support any standard OAuth 2.0 authentication workflow.", + "description": "ASP.NET Core middleware that enables an application to support any standard OAuth 2.0 authentication workflow.", + "tags": [ + "aspnetcore", + "authentication", + "security" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" diff --git a/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectMiddleware.cs b/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectMiddleware.cs index 86ba433123..76936e25a6 100644 --- a/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectMiddleware.cs +++ b/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/OpenIdConnectMiddleware.cs @@ -17,14 +17,14 @@ using Microsoft.IdentityModel.Protocols.OpenIdConnect; namespace Microsoft.AspNetCore.Authentication.OpenIdConnect { /// - /// ASP.NET middleware for obtaining identities using OpenIdConnect protocol. + /// ASP.NET Core middleware for obtaining identities using OpenIdConnect protocol. /// public class OpenIdConnectMiddleware : AuthenticationMiddleware { /// /// Initializes a /// - /// The next middleware in the ASP.NET pipeline to invoke. + /// The next middleware in the middleware pipeline to invoke. /// provider for creating a data protector. /// factory for creating a . /// @@ -134,7 +134,7 @@ namespace Microsoft.AspNetCore.Authentication.OpenIdConnect } Backchannel = new HttpClient(Options.BackchannelHttpHandler ?? new HttpClientHandler()); - Backchannel.DefaultRequestHeaders.UserAgent.ParseAdd("Microsoft ASP.NET OpenIdConnect middleware"); + Backchannel.DefaultRequestHeaders.UserAgent.ParseAdd("Microsoft ASP.NET Core OpenIdConnect middleware"); Backchannel.Timeout = Options.BackchannelTimeout; Backchannel.MaxResponseContentBufferSize = 1024 * 1024 * 10; // 10 MB diff --git a/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/project.json b/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/project.json index 870884c4df..eee5f0942f 100644 --- a/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/project.json +++ b/src/Microsoft.AspNetCore.Authentication.OpenIdConnect/project.json @@ -1,6 +1,11 @@ { "version": "0.1.0-*", - "description": "ASP.NET 5 middleware that enables an application to support the OpenID Connect authentication workflow.", + "description": "ASP.NET Core middleware that enables an application to support the OpenID Connect authentication workflow.", + "tags": [ + "aspnetcore", + "authentication", + "security" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" @@ -16,7 +21,7 @@ "Microsoft.IdentityModel.Protocols.OpenIdConnect": "2.0.0-*" }, "frameworks": { - "net451": {}, + "net451": { }, "netstandard1.3": { "imports": [ "dotnet5.4", diff --git a/src/Microsoft.AspNetCore.Authentication.Twitter/TwitterMiddleware.cs b/src/Microsoft.AspNetCore.Authentication.Twitter/TwitterMiddleware.cs index 7845b4bbcc..542115117f 100644 --- a/src/Microsoft.AspNetCore.Authentication.Twitter/TwitterMiddleware.cs +++ b/src/Microsoft.AspNetCore.Authentication.Twitter/TwitterMiddleware.cs @@ -15,7 +15,7 @@ using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.Authentication.Twitter { /// - /// ASP.NET middleware for authenticating users using Twitter + /// ASP.NET Core middleware for authenticating users using Twitter. /// [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Middleware are not disposable.")] public class TwitterMiddleware : AuthenticationMiddleware @@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Authentication.Twitter _httpClient.Timeout = Options.BackchannelTimeout; _httpClient.MaxResponseContentBufferSize = 1024 * 1024 * 10; // 10 MB _httpClient.DefaultRequestHeaders.Accept.ParseAdd("*/*"); - _httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("Microsoft ASP.NET Twitter middleware"); + _httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("Microsoft ASP.NET Core Twitter middleware"); _httpClient.DefaultRequestHeaders.ExpectContinue = false; } diff --git a/src/Microsoft.AspNetCore.Authentication.Twitter/project.json b/src/Microsoft.AspNetCore.Authentication.Twitter/project.json index 3dbaf2bf6c..73e5c9b7af 100644 --- a/src/Microsoft.AspNetCore.Authentication.Twitter/project.json +++ b/src/Microsoft.AspNetCore.Authentication.Twitter/project.json @@ -1,6 +1,11 @@ { "version": "1.0.0-*", - "description": "ASP.NET 5 middleware that enables an application to support Twitter's OAuth 2.0 authentication workflow.", + "description": "ASP.NET Core middleware that enables an application to support Twitter's OAuth 2.0 authentication workflow.", + "tags": [ + "aspnetcore", + "authentication", + "security" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" diff --git a/src/Microsoft.AspNetCore.Authentication/project.json b/src/Microsoft.AspNetCore.Authentication/project.json index 8339dc0c31..f02351c2cd 100644 --- a/src/Microsoft.AspNetCore.Authentication/project.json +++ b/src/Microsoft.AspNetCore.Authentication/project.json @@ -1,6 +1,11 @@ { "version": "1.0.0-*", - "description": "ASP.NET 5 common types used by the various authentication middleware.", + "description": "ASP.NET Core common types used by the various authentication middleware components.", + "tags": [ + "aspnetcore", + "authentication", + "security" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" diff --git a/src/Microsoft.AspNetCore.Authorization/project.json b/src/Microsoft.AspNetCore.Authorization/project.json index 7a53cad1db..e75441dc84 100644 --- a/src/Microsoft.AspNetCore.Authorization/project.json +++ b/src/Microsoft.AspNetCore.Authorization/project.json @@ -1,6 +1,10 @@ { "version": "1.0.0-*", - "description": "ASP.NET 5 authorization classes.", + "description": "ASP.NET 5 authorization classes.\r\nCommonly used types:\r\nMicrosoft.AspNetCore.Authorization.AllowAnonymousAttribute\r\nMicrosoft.AspNetCore.Authorization.AuthorizeAttribute", + "tags": [ + "aspnetcore", + "authorization" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" diff --git a/src/Microsoft.AspNetCore.CookiePolicy/project.json b/src/Microsoft.AspNetCore.CookiePolicy/project.json index 1c2a549bef..f1c7b77b91 100644 --- a/src/Microsoft.AspNetCore.CookiePolicy/project.json +++ b/src/Microsoft.AspNetCore.CookiePolicy/project.json @@ -1,6 +1,9 @@ { "version": "1.0.0-*", - "description": "ASP.NET 5 cookie policy classes.", + "description": "ASP.NET Core cookie policy classes to control the behavior of cookies.", + "tags": [ + "aspnetcore" + ], "repository": { "type": "git", "url": "git://github.com/aspnet/security" @@ -16,7 +19,7 @@ "Microsoft.Extensions.Options": "1.0.0-*" }, "frameworks": { - "net451": {}, + "net451": { }, "netstandard1.3": { "imports": [ "dotnet5.4" diff --git a/src/Microsoft.Owin.Security.Interop/project.json b/src/Microsoft.Owin.Security.Interop/project.json index 741385c83a..691b16c42d 100644 --- a/src/Microsoft.Owin.Security.Interop/project.json +++ b/src/Microsoft.Owin.Security.Interop/project.json @@ -1,17 +1,23 @@ { - "version": "1.0.0-*", + "version": "1.0.0-*", "compilationOptions": { "warningsAsErrors": true, "keyFile": "../../tools/Key.snk", "nowarn": [ "CS1591" ], "xmlDoc": true }, - "description": "A compatibility layer for sharing authentication tickets between Microsoft.Owin.Security and Microsoft.AspNetCore.Authentication.", - "dependencies": { - "Microsoft.AspNetCore.DataProtection.Extensions": "1.0.0-*", - "Microsoft.Owin.Security": "3.0.1" - }, - "frameworks": { - "net451": { } - } + "description": "A compatibility layer for sharing authentication tickets between Microsoft.Owin.Security and Microsoft.AspNetCore.Authentication.", + "tags": [ + "aspnetcore", + "katana", + "owin", + "security" + ], + "dependencies": { + "Microsoft.AspNetCore.DataProtection.Extensions": "1.0.0-*", + "Microsoft.Owin.Security": "3.0.1" + }, + "frameworks": { + "net451": { } + } } \ No newline at end of file diff --git a/test/Microsoft.Owin.Security.Interop.Test/CookieInteropTests.cs b/test/Microsoft.Owin.Security.Interop.Test/CookieInteropTests.cs index ef80b78e6e..3c08f58bd6 100644 --- a/test/Microsoft.Owin.Security.Interop.Test/CookieInteropTests.cs +++ b/test/Microsoft.Owin.Security.Interop.Test/CookieInteropTests.cs @@ -31,7 +31,7 @@ namespace Microsoft.Owin.Security.Interop var dataProtection = new DataProtectionProvider(new DirectoryInfo("..\\..\\artifacts")); var dataProtector = dataProtection.CreateProtector( - "Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware", // full name of the ASP.NET 5 type + "Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware", // full name of the ASP.NET Core type CookieAuthenticationDefaults.AuthenticationType, "v2"); var interopServer = TestServer.Create(app => @@ -87,7 +87,7 @@ namespace Microsoft.Owin.Security.Interop var dataProtection = new DataProtectionProvider(new DirectoryInfo("..\\..\\artifacts")); var dataProtector = dataProtection.CreateProtector( - "Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware", // full name of the ASP.NET 5 type + "Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware", // full name of the ASP.NET Core type CookieAuthenticationDefaults.AuthenticationType, "v2"); var builder = new WebHostBuilder()