Skip to content

Commit 858466d

Browse files
committed
fixes a bug, that could be affect production environments
1 parent 781306a commit 858466d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/CZ.AspNetCore.EasyAuthAuthentication/EasyAuthAuthenticationHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class EasyAuthAuthenticationHandler : AuthenticationHandler<EasyAuthAuthe
2525
private static readonly Func<IHeaderDictionary, string, bool> IsHeaderSet =
2626
(headers, headerName) => !string.IsNullOrEmpty(headers[headerName].ToString());
2727

28-
private static Func<IHeaderDictionary, ClaimsPrincipal, HttpRequest, EasyAuthAuthenticationOptions, bool> CanUseEasyAuthJson =
28+
private Func<IHeaderDictionary, ClaimsPrincipal, HttpRequest, EasyAuthAuthenticationOptions, bool> CanUseEasyAuthJson =
2929
(headers, user, request, options) =>
3030
IsContextUserNotAuthenticated(user)
3131
&& !IsHeaderSet(headers, AuthTokenHeaderNames.AADIdToken);
@@ -58,7 +58,7 @@ private void SetupHandler()
5858
{
5959
var authEnabled = this.appConfiguration.GetValue<bool?>("APPSETTING_WEBSITE_AUTH_ENABLED");
6060
var allowAnoymos = this.appConfiguration.GetValue<string?>("APPSETTING_WEBSITE_AUTH_UNAUTHENTICATED_ACTION") == "AllowAnonymous" ? true : false;
61-
if(authEnabled == null || authEnabled == false)
61+
if (authEnabled == null || authEnabled == false)
6262
{
6363
// auth is turned of. So hopefully the user is in local debugging.
6464
return;

0 commit comments

Comments
 (0)