Skip to content

Commit 417f702

Browse files
committed
Fix error in EasyAuthForAuthorizationTokenService
1 parent 1c52e96 commit 417f702

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/CZ.AspNetCore.EasyAuthAuthentication/Services/EasyAuthForAuthorizationTokenService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private AuthenticateResult AuthUser(HttpContext context, ProviderOptions? option
6666
/// <inheritdoc/>
6767
private bool CanHandleAuthentification(HttpContext httpContext) =>
6868
IsHeaderSet(httpContext.Request.Headers, AuthorizationHeader) &&
69-
httpContext.Request.Headers[AuthorizationHeader].FirstOrDefault().Contains(JWTIdentifier);
69+
httpContext.Request.Headers[AuthorizationHeader].FirstOrDefault()?.Contains(JWTIdentifier) == true;
7070

7171
private IEnumerable<AADClaimsModel> BuildFromAuthToken(JObject xMsClientPrincipal, ProviderOptions options)
7272
{

0 commit comments

Comments
 (0)