From 51c3dc98dc08a1e4a761bb77469a45b3b33271c2 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Wed, 10 Sep 2014 12:27:01 -0700 Subject: [PATCH] Handle IBuilder rename to IApplicationBuilder. --- samples/CookieSample/Startup.cs | 2 +- samples/SocialSample/Startup.cs | 2 +- .../CookieAuthenticationExtensions.cs | 4 ++-- .../CookieAuthenticationOptions.cs | 2 +- .../FacebookAuthenticationExtensions.cs | 12 ++++++------ .../GoogleAuthenticationExtensions.cs | 12 ++++++------ .../MicrosoftAccountAuthenticationExtensions.cs | 12 ++++++------ .../OAuthAuthenticationExtensions.cs | 6 +++--- .../TwitterAuthenticationExtensions.cs | 12 ++++++------ .../BuilderSecurityExtensions.cs | 4 ++-- src/Microsoft.AspNet.Security/Resources.Designer.cs | 4 ++-- src/Microsoft.AspNet.Security/Resources.resx | 4 ++-- .../Facebook/FacebookMiddlewareTests.cs | 2 +- .../MicrosoftAccountMiddlewareTests.cs | 2 +- .../Twitter/TwitterMiddlewareTests.cs | 2 +- 15 files changed, 41 insertions(+), 41 deletions(-) diff --git a/samples/CookieSample/Startup.cs b/samples/CookieSample/Startup.cs index 2a01fc0b26..2e5602b9c4 100644 --- a/samples/CookieSample/Startup.cs +++ b/samples/CookieSample/Startup.cs @@ -7,7 +7,7 @@ namespace CookieSample { public class Startup { - public void Configure(IBuilder app) + public void Configure(IApplicationBuilder app) { app.UseCookieAuthentication(new CookieAuthenticationOptions() { diff --git a/samples/SocialSample/Startup.cs b/samples/SocialSample/Startup.cs index f3aff738d8..5fbb8887a4 100644 --- a/samples/SocialSample/Startup.cs +++ b/samples/SocialSample/Startup.cs @@ -19,7 +19,7 @@ namespace CookieSample { public class Startup { - public void Configure(IBuilder app) + public void Configure(IApplicationBuilder app) { app.UseErrorPage(); diff --git a/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationExtensions.cs b/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationExtensions.cs index eb4f64903a..03af44a43d 100644 --- a/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationExtensions.cs +++ b/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationExtensions.cs @@ -13,10 +13,10 @@ namespace Microsoft.AspNet.Builder /// /// Adds a cookie-based authentication middleware to your web application pipeline. /// - /// The IBuilder passed to your configuration method + /// The IApplicationBuilder passed to your configuration method /// An options class that controls the middleware behavior /// The original app parameter - public static IBuilder UseCookieAuthentication([NotNull] this IBuilder app, [NotNull] CookieAuthenticationOptions options) + public static IApplicationBuilder UseCookieAuthentication([NotNull] this IApplicationBuilder app, [NotNull] CookieAuthenticationOptions options) { return app.UseMiddleware(options); } diff --git a/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationOptions.cs b/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationOptions.cs index 8499fa33f6..f04c51264b 100644 --- a/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationOptions.cs +++ b/src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationOptions.cs @@ -125,7 +125,7 @@ namespace Microsoft.AspNet.Security.Cookies /// /// The TicketDataFormat is used to protect and unprotect the identity and other properties which are stored in the /// cookie value. If it is not provided a default data handler is created using the data protection service contained - /// in the IBuilder.Properties. The default data protection service is based on machine key when running on ASP.NET, + /// in the IApplicationBuilder.Properties. The default data protection service is based on machine key when running on ASP.NET, /// and on DPAPI when running in a different process. /// public ISecureDataFormat TicketDataFormat { get; set; } diff --git a/src/Microsoft.AspNet.Security.Facebook/FacebookAuthenticationExtensions.cs b/src/Microsoft.AspNet.Security.Facebook/FacebookAuthenticationExtensions.cs index 7f7cb4ebd9..5438272090 100644 --- a/src/Microsoft.AspNet.Security.Facebook/FacebookAuthenticationExtensions.cs +++ b/src/Microsoft.AspNet.Security.Facebook/FacebookAuthenticationExtensions.cs @@ -13,11 +13,11 @@ namespace Microsoft.AspNet.Builder /// /// Authenticate users using Facebook. /// - /// The passed to the configure method. + /// The passed to the configure method. /// The appId assigned by Facebook. /// The appSecret assigned by Facebook. - /// The updated . - public static IBuilder UseFacebookAuthentication([NotNull] this IBuilder app, [NotNull] string appId, [NotNull] string appSecret) + /// The updated . + public static IApplicationBuilder UseFacebookAuthentication([NotNull] this IApplicationBuilder app, [NotNull] string appId, [NotNull] string appSecret) { return app.UseFacebookAuthentication(new FacebookAuthenticationOptions() { @@ -29,10 +29,10 @@ namespace Microsoft.AspNet.Builder /// /// Authenticate users using Facebook. /// - /// The passed to the configure method. + /// The passed to the configure method. /// The middleware configuration options. - /// The updated . - public static IBuilder UseFacebookAuthentication([NotNull] this IBuilder app, [NotNull] FacebookAuthenticationOptions options) + /// The updated . + public static IApplicationBuilder UseFacebookAuthentication([NotNull] this IApplicationBuilder app, [NotNull] FacebookAuthenticationOptions options) { if (string.IsNullOrEmpty(options.SignInAsAuthenticationType)) { diff --git a/src/Microsoft.AspNet.Security.Google/GoogleAuthenticationExtensions.cs b/src/Microsoft.AspNet.Security.Google/GoogleAuthenticationExtensions.cs index cfac477731..571ff5ffe3 100644 --- a/src/Microsoft.AspNet.Security.Google/GoogleAuthenticationExtensions.cs +++ b/src/Microsoft.AspNet.Security.Google/GoogleAuthenticationExtensions.cs @@ -13,11 +13,11 @@ namespace Microsoft.AspNet.Builder /// /// Authenticate users using Google OAuth 2.0. /// - /// The passed to the configure method. + /// The passed to the configure method. /// The google assigned client id. /// The google assigned client secret. - /// The updated . - public static IBuilder UseGoogleAuthentication([NotNull] this IBuilder app, [NotNull] string clientId, [NotNull] string clientSecret) + /// The updated . + public static IApplicationBuilder UseGoogleAuthentication([NotNull] this IApplicationBuilder app, [NotNull] string clientId, [NotNull] string clientSecret) { return app.UseGoogleAuthentication( new GoogleAuthenticationOptions @@ -30,10 +30,10 @@ namespace Microsoft.AspNet.Builder /// /// Authenticate users using Google OAuth 2.0. /// - /// The passed to the configure method. + /// The passed to the configure method. /// Middleware configuration options. - /// The updated . - public static IBuilder UseGoogleAuthentication([NotNull] this IBuilder app, [NotNull] GoogleAuthenticationOptions options) + /// The updated . + public static IApplicationBuilder UseGoogleAuthentication([NotNull] this IApplicationBuilder app, [NotNull] GoogleAuthenticationOptions options) { if (string.IsNullOrEmpty(options.SignInAsAuthenticationType)) { diff --git a/src/Microsoft.AspNet.Security.MicrosoftAccount/MicrosoftAccountAuthenticationExtensions.cs b/src/Microsoft.AspNet.Security.MicrosoftAccount/MicrosoftAccountAuthenticationExtensions.cs index 468d279078..9963abf1d6 100644 --- a/src/Microsoft.AspNet.Security.MicrosoftAccount/MicrosoftAccountAuthenticationExtensions.cs +++ b/src/Microsoft.AspNet.Security.MicrosoftAccount/MicrosoftAccountAuthenticationExtensions.cs @@ -13,11 +13,11 @@ namespace Microsoft.AspNet.Builder /// /// Authenticate users using Microsoft Account. /// - /// The passed to the configure method. + /// The passed to the configure method. /// The application client ID assigned by the Microsoft authentication service. /// The application client secret assigned by the Microsoft authentication service. - /// The updated . - public static IBuilder UseMicrosoftAccountAuthentication([NotNull] this IBuilder app, [NotNull] string clientId, [NotNull] string clientSecret) + /// The updated . + public static IApplicationBuilder UseMicrosoftAccountAuthentication([NotNull] this IApplicationBuilder app, [NotNull] string clientId, [NotNull] string clientSecret) { return app.UseMicrosoftAccountAuthentication( new MicrosoftAccountAuthenticationOptions @@ -30,10 +30,10 @@ namespace Microsoft.AspNet.Builder /// /// Authenticate users using Microsoft Account. /// - /// The passed to the configure method. + /// The passed to the configure method. /// The middleware configuration options. - /// The updated . - public static IBuilder UseMicrosoftAccountAuthentication([NotNull] this IBuilder app, [NotNull] MicrosoftAccountAuthenticationOptions options) + /// The updated . + public static IApplicationBuilder UseMicrosoftAccountAuthentication([NotNull] this IApplicationBuilder app, [NotNull] MicrosoftAccountAuthenticationOptions options) { if (string.IsNullOrEmpty(options.SignInAsAuthenticationType)) { diff --git a/src/Microsoft.AspNet.Security.OAuth/OAuthAuthenticationExtensions.cs b/src/Microsoft.AspNet.Security.OAuth/OAuthAuthenticationExtensions.cs index e140620e65..0b6f0ddec6 100644 --- a/src/Microsoft.AspNet.Security.OAuth/OAuthAuthenticationExtensions.cs +++ b/src/Microsoft.AspNet.Security.OAuth/OAuthAuthenticationExtensions.cs @@ -15,10 +15,10 @@ namespace Microsoft.AspNet.Builder /// /// Authenticate users using OAuth. /// - /// The passed to the configure method. + /// The passed to the configure method. /// The middleware configuration options. - /// The updated . - public static IBuilder UseOAuthAuthentication([NotNull] this IBuilder app, [NotNull] OAuthAuthenticationOptions options) + /// The updated . + public static IApplicationBuilder UseOAuthAuthentication([NotNull] this IApplicationBuilder app, [NotNull] OAuthAuthenticationOptions options) { if (string.IsNullOrEmpty(options.SignInAsAuthenticationType)) { diff --git a/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationExtensions.cs b/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationExtensions.cs index 250c721cba..aa56249cca 100644 --- a/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationExtensions.cs +++ b/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationExtensions.cs @@ -13,11 +13,11 @@ namespace Microsoft.AspNet.Builder /// /// Authenticate users using Twitter /// - /// The passed to the configure method + /// The passed to the configure method /// The Twitter-issued consumer key /// The Twitter-issued consumer secret - /// The updated - public static IBuilder UseTwitterAuthentication([NotNull] this IBuilder app, [NotNull] string consumerKey, [NotNull] string consumerSecret) + /// The updated + public static IApplicationBuilder UseTwitterAuthentication([NotNull] this IApplicationBuilder app, [NotNull] string consumerKey, [NotNull] string consumerSecret) { return app.UseTwitterAuthentication( new TwitterAuthenticationOptions @@ -30,10 +30,10 @@ namespace Microsoft.AspNet.Builder /// /// Authenticate users using Twitter /// - /// The passed to the configure method + /// The passed to the configure method /// Middleware configuration options - /// The updated - public static IBuilder UseTwitterAuthentication([NotNull] this IBuilder app, [NotNull] TwitterAuthenticationOptions options) + /// The updated + public static IApplicationBuilder UseTwitterAuthentication([NotNull] this IApplicationBuilder app, [NotNull] TwitterAuthenticationOptions options) { if (string.IsNullOrEmpty(options.SignInAsAuthenticationType)) { diff --git a/src/Microsoft.AspNet.Security/BuilderSecurityExtensions.cs b/src/Microsoft.AspNet.Security/BuilderSecurityExtensions.cs index 6043a0966c..5a9aec367f 100644 --- a/src/Microsoft.AspNet.Security/BuilderSecurityExtensions.cs +++ b/src/Microsoft.AspNet.Security/BuilderSecurityExtensions.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNet.Builder /// /// App builder passed to the application startup code /// - public static string GetDefaultSignInAsAuthenticationType([NotNull] this IBuilder app) + public static string GetDefaultSignInAsAuthenticationType([NotNull] this IApplicationBuilder app) { object value; if (app.Properties.TryGetValue(Constants.DefaultSignInAsAuthenticationType, out value)) @@ -37,7 +37,7 @@ namespace Microsoft.AspNet.Builder /// /// App builder passed to the application startup code /// AuthenticationType that external middleware should sign in as. - public static void SetDefaultSignInAsAuthenticationType([NotNull] this IBuilder app, [NotNull] string authenticationType) + public static void SetDefaultSignInAsAuthenticationType([NotNull] this IApplicationBuilder app, [NotNull] string authenticationType) { app.Properties[Constants.DefaultSignInAsAuthenticationType] = authenticationType; } diff --git a/src/Microsoft.AspNet.Security/Resources.Designer.cs b/src/Microsoft.AspNet.Security/Resources.Designer.cs index d535265888..485da1825d 100644 --- a/src/Microsoft.AspNet.Security/Resources.Designer.cs +++ b/src/Microsoft.AspNet.Security/Resources.Designer.cs @@ -70,7 +70,7 @@ namespace Microsoft.AspNet.Security { } /// - /// Looks up a localized string similar to The default data protection provider may only be used when the IBuilder.Properties contains an appropriate 'host.AppName' key.. + /// Looks up a localized string similar to The default data protection provider may only be used when the IApplicationBuilder.Properties contains an appropriate 'host.AppName' key.. /// internal static string Exception_DefaultDpapiRequiresAppNameKey { get { @@ -79,7 +79,7 @@ namespace Microsoft.AspNet.Security { } /// - /// Looks up a localized string similar to A default value for SignInAsAuthenticationType was not found in IBuilder Properties. This can happen if your authentication middleware are added in the wrong order, or if one is missing.. + /// Looks up a localized string similar to A default value for SignInAsAuthenticationType was not found in IApplicationBuilder Properties. This can happen if your authentication middleware are added in the wrong order, or if one is missing.. /// internal static string Exception_MissingDefaultSignInAsAuthenticationType { get { diff --git a/src/Microsoft.AspNet.Security/Resources.resx b/src/Microsoft.AspNet.Security/Resources.resx index 5a02ab7725..f0765cc325 100644 --- a/src/Microsoft.AspNet.Security/Resources.resx +++ b/src/Microsoft.AspNet.Security/Resources.resx @@ -118,13 +118,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - The default data protection provider may only be used when the IBuilder.Properties contains an appropriate 'host.AppName' key. + The default data protection provider may only be used when the IApplicationBuilder.Properties contains an appropriate 'host.AppName' key. The state passed to UnhookAuthentication may only be the return value from HookAuthentication. - A default value for SignInAsAuthenticationType was not found in IBuilder Properties. This can happen if your authentication middleware are added in the wrong order, or if one is missing. + A default value for SignInAsAuthenticationType was not found in IApplicationBuilder Properties. This can happen if your authentication middleware are added in the wrong order, or if one is missing. The AuthenticationTokenProvider's required synchronous events have not been registered. diff --git a/test/Microsoft.AspNet.Security.Test/Facebook/FacebookMiddlewareTests.cs b/test/Microsoft.AspNet.Security.Test/Facebook/FacebookMiddlewareTests.cs index 56467a7601..672dc04ac9 100644 --- a/test/Microsoft.AspNet.Security.Test/Facebook/FacebookMiddlewareTests.cs +++ b/test/Microsoft.AspNet.Security.Test/Facebook/FacebookMiddlewareTests.cs @@ -69,7 +69,7 @@ namespace Microsoft.AspNet.Security.Facebook location.ShouldContain("state="); } - private static TestServer CreateServer(Action configure, Func handler) + private static TestServer CreateServer(Action configure, Func handler) { return TestServer.Create(app => { diff --git a/test/Microsoft.AspNet.Security.Test/MicrosoftAccount/MicrosoftAccountMiddlewareTests.cs b/test/Microsoft.AspNet.Security.Test/MicrosoftAccount/MicrosoftAccountMiddlewareTests.cs index 7bfb0d4491..a19aeae05c 100644 --- a/test/Microsoft.AspNet.Security.Test/MicrosoftAccount/MicrosoftAccountMiddlewareTests.cs +++ b/test/Microsoft.AspNet.Security.Test/MicrosoftAccount/MicrosoftAccountMiddlewareTests.cs @@ -151,7 +151,7 @@ namespace Microsoft.AspNet.Security.Tests.MicrosoftAccount transaction.FindClaimValue("RefreshToken").ShouldBe("Test Refresh Token"); } - private static TestServer CreateServer(Action configure, Func handler) + private static TestServer CreateServer(Action configure, Func handler) { return TestServer.Create(app => { diff --git a/test/Microsoft.AspNet.Security.Test/Twitter/TwitterMiddlewareTests.cs b/test/Microsoft.AspNet.Security.Test/Twitter/TwitterMiddlewareTests.cs index 75f7ebbfd3..461e541845 100644 --- a/test/Microsoft.AspNet.Security.Test/Twitter/TwitterMiddlewareTests.cs +++ b/test/Microsoft.AspNet.Security.Test/Twitter/TwitterMiddlewareTests.cs @@ -105,7 +105,7 @@ namespace Microsoft.AspNet.Security.Twitter location.ShouldContain("https://twitter.com/oauth/authenticate?oauth_token="); } - private static TestServer CreateServer(Action configure, Func handler) + private static TestServer CreateServer(Action configure, Func handler) { return TestServer.Create(app => {