From c3c19ff45bc30451529f1afbf6596d537e90b3a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20August=C3=BDn?= Date: Tue, 9 Jan 2024 16:45:01 +0100 Subject: [PATCH] chore: code adjusted --- .../grpc/jwt/keycloak/server/KeycloakJwtTokenParser.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keycloak/src/main/java/com/avast/grpc/jwt/keycloak/server/KeycloakJwtTokenParser.java b/keycloak/src/main/java/com/avast/grpc/jwt/keycloak/server/KeycloakJwtTokenParser.java index 23abbc9..65a6509 100644 --- a/keycloak/src/main/java/com/avast/grpc/jwt/keycloak/server/KeycloakJwtTokenParser.java +++ b/keycloak/src/main/java/com/avast/grpc/jwt/keycloak/server/KeycloakJwtTokenParser.java @@ -1,6 +1,8 @@ package com.avast.grpc.jwt.keycloak.server; import com.avast.grpc.jwt.server.JwtTokenParser; + +import java.util.Collections; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; @@ -34,7 +36,7 @@ public KeycloakJwtTokenParser( new TokenVerifier.Predicate[] { new IssuersCheck(issuers.toArray(new String[0])), TokenVerifier.SUBJECT_EXISTS_CHECK, - new TokenVerifier.TokenTypeCheck(TokenUtil.TOKEN_TYPE_BEARER), + new TokenVerifier.TokenTypeCheck(Collections.singletonList(TokenUtil.TOKEN_TYPE_BEARER)), TokenVerifier.IS_ACTIVE }; }