Fixed suggestion re using AddCookie(s) for authz (#13869)
This commit is contained in:
parent
64157c95c1
commit
be33a6f392
|
|
@ -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}.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue