File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
src/main/java/com/avast/grpc/jwt/keycloak/server Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 11plugins {
2- id ' com.github.sherter.google-java-format' version ' 0.9' apply false
32 id ' com.google.protobuf' version ' 0.9.1' apply false
43 id ' com.avast.gradle.docker-compose' version ' 0.16.9' apply false
54 id ' io.github.gradle-nexus.publish-plugin' version ' 1.1.0'
@@ -26,7 +25,6 @@ subprojects {
2625 apply plugin : ' java-library'
2726 apply plugin : ' maven-publish'
2827 apply plugin : ' signing'
29- apply plugin : ' com.github.sherter.google-java-format'
3028
3129 sourceCompatibility = JavaVersion . VERSION_1_8
3230
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ protobuf {
2525
2626dependencies {
2727 api project(' :core' )
28- api ' org.keycloak:keycloak-admin-client:19 .0.3 '
28+ api ' org.keycloak:keycloak-admin-client:20 .0.1 '
2929 api ' org.bouncycastle:bcprov-jdk15on:1.70'
3030 api ' com.typesafe:config:1.4.2'
3131
Original file line number Diff line number Diff line change 11package com .avast .grpc .jwt .keycloak .server ;
22
33import com .avast .grpc .jwt .server .JwtTokenParser ;
4- import com .google .common .base .Strings ;
54import java .util .List ;
65import java .util .concurrent .CompletableFuture ;
76import java .util .concurrent .CompletionException ;
87import java .util .stream .Collectors ;
8+
99import org .keycloak .TokenVerifier ;
1010import org .keycloak .common .VerificationException ;
1111import org .keycloak .constants .ServiceUrlConstants ;
@@ -63,10 +63,10 @@ protected TokenVerifier<AccessToken> createTokenVerifier(String jwtToken)
6363 throws VerificationException {
6464 TokenVerifier <AccessToken > verifier =
6565 TokenVerifier .create (jwtToken , AccessToken .class ).withChecks (checks );
66- if (! Strings . isNullOrEmpty ( expectedAudience )) {
66+ if (expectedAudience != null && ! expectedAudience . isEmpty ( )) {
6767 verifier = verifier .audience (expectedAudience );
6868 }
69- if (! Strings . isNullOrEmpty ( expectedIssuedFor )) {
69+ if (expectedIssuedFor != null && ! expectedIssuedFor . isEmpty ( )) {
7070 verifier = verifier .issuedFor (expectedIssuedFor );
7171 }
7272 verifier .publicKey (publicKeyProvider .get (verifier .getHeader ().getKeyId ()));
You can’t perform that action at this time.
0 commit comments