File tree 3 files changed +4
-6
lines changed
src/main/java/com/avast/grpc/jwt/keycloak/server
3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
plugins {
2
- id ' com.github.sherter.google-java-format' version ' 0.9' apply false
3
2
id ' com.google.protobuf' version ' 0.9.1' apply false
4
3
id ' com.avast.gradle.docker-compose' version ' 0.16.9' apply false
5
4
id ' io.github.gradle-nexus.publish-plugin' version ' 1.1.0'
@@ -26,7 +25,6 @@ subprojects {
26
25
apply plugin : ' java-library'
27
26
apply plugin : ' maven-publish'
28
27
apply plugin : ' signing'
29
- apply plugin : ' com.github.sherter.google-java-format'
30
28
31
29
sourceCompatibility = JavaVersion . VERSION_1_8
32
30
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ protobuf {
25
25
26
26
dependencies {
27
27
api project(' :core' )
28
- api ' org.keycloak:keycloak-admin-client:19 .0.3 '
28
+ api ' org.keycloak:keycloak-admin-client:20 .0.1 '
29
29
api ' org.bouncycastle:bcprov-jdk15on:1.70'
30
30
api ' com.typesafe:config:1.4.2'
31
31
Original file line number Diff line number Diff line change 1
1
package com .avast .grpc .jwt .keycloak .server ;
2
2
3
3
import com .avast .grpc .jwt .server .JwtTokenParser ;
4
- import com .google .common .base .Strings ;
5
4
import java .util .List ;
6
5
import java .util .concurrent .CompletableFuture ;
7
6
import java .util .concurrent .CompletionException ;
8
7
import java .util .stream .Collectors ;
8
+
9
9
import org .keycloak .TokenVerifier ;
10
10
import org .keycloak .common .VerificationException ;
11
11
import org .keycloak .constants .ServiceUrlConstants ;
@@ -63,10 +63,10 @@ protected TokenVerifier<AccessToken> createTokenVerifier(String jwtToken)
63
63
throws VerificationException {
64
64
TokenVerifier <AccessToken > verifier =
65
65
TokenVerifier .create (jwtToken , AccessToken .class ).withChecks (checks );
66
- if (! Strings . isNullOrEmpty ( expectedAudience )) {
66
+ if (expectedAudience != null && ! expectedAudience . isEmpty ( )) {
67
67
verifier = verifier .audience (expectedAudience );
68
68
}
69
- if (! Strings . isNullOrEmpty ( expectedIssuedFor )) {
69
+ if (expectedIssuedFor != null && ! expectedIssuedFor . isEmpty ( )) {
70
70
verifier = verifier .issuedFor (expectedIssuedFor );
71
71
}
72
72
verifier .publicKey (publicKeyProvider .get (verifier .getHeader ().getKeyId ()));
You can’t perform that action at this time.
0 commit comments