From be33a6f392b6182f253a930823003082ab5843c1 Mon Sep 17 00:00:00 2001 From: Kirk Larkin <6025110+serpent5@users.noreply.github.com> Date: Wed, 11 Sep 2019 16:09:20 +0100 Subject: [PATCH] Fixed suggestion re using AddCookie(s) for authz (#13869) --- src/Http/Authentication.Core/src/AuthenticationService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Http/Authentication.Core/src/AuthenticationService.cs b/src/Http/Authentication.Core/src/AuthenticationService.cs index 7efce69ce8..9cc0807539 100644 --- a/src/Http/Authentication.Core/src/AuthenticationService.cs +++ b/src/Http/Authentication.Core/src/AuthenticationService.cs @@ -253,7 +253,7 @@ namespace Microsoft.AspNetCore.Authentication var schemes = await GetAllSignInSchemeNames(); // CookieAuth is the only implementation of sign-in. - var footer = $" Did you forget to call AddAuthentication().AddCookies(\"{scheme}\",...)?"; + var footer = $" Did you forget to call AddAuthentication().AddCookie(\"{scheme}\",...)?"; if (string.IsNullOrEmpty(schemes)) { @@ -275,7 +275,7 @@ namespace Microsoft.AspNetCore.Authentication { // CookieAuth is the only implementation of sign-in. return new InvalidOperationException(mismatchError - + $"Did you forget to call AddAuthentication().AddCookies(\"Cookies\") and SignInAsync(\"Cookies\",...)?"); + + $"Did you forget to call AddAuthentication().AddCookie(\"Cookies\") and SignInAsync(\"Cookies\",...)?"); } return new InvalidOperationException(mismatchError + $"The registered sign-in schemes are: {schemes}."); @@ -292,7 +292,7 @@ namespace Microsoft.AspNetCore.Authentication { var schemes = await GetAllSignOutSchemeNames(); - var footer = $" Did you forget to call AddAuthentication().AddCookies(\"{scheme}\",...)?"; + var footer = $" Did you forget to call AddAuthentication().AddCookie(\"{scheme}\",...)?"; if (string.IsNullOrEmpty(schemes)) { @@ -314,7 +314,7 @@ namespace Microsoft.AspNetCore.Authentication { // CookieAuth is the most common implementation of sign-out, but OpenIdConnect and WsFederation also support it. return new InvalidOperationException(mismatchError - + $"Did you forget to call AddAuthentication().AddCookies(\"Cookies\") and {nameof(SignOutAsync)}(\"Cookies\",...)?"); + + $"Did you forget to call AddAuthentication().AddCookie(\"Cookies\") and {nameof(SignOutAsync)}(\"Cookies\",...)?"); } return new InvalidOperationException(mismatchError + $"The registered sign-out schemes are: {schemes}.");