Skip to content

Commit

Permalink
fix(deps): update dependency org.keycloak:keycloak-admin-client to v20 (
Browse files Browse the repository at this point in the history
#390)

* fix(deps): update dependency org.keycloak:keycloak-admin-client to v20

* chore: guava not used

* chore: unmaintained plugin removed

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michal Augustýn <[email protected]>
  • Loading branch information
renovate[bot] and augi authored Nov 8, 2022
1 parent 5b94184 commit a9a3639
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
plugins {
id 'com.github.sherter.google-java-format' version '0.9' apply false
id 'com.google.protobuf' version '0.9.1' apply false
id 'com.avast.gradle.docker-compose' version '0.16.9' apply false
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
Expand All @@ -26,7 +25,6 @@ subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'com.github.sherter.google-java-format'

sourceCompatibility = JavaVersion.VERSION_1_8

Expand Down
2 changes: 1 addition & 1 deletion keycloak/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protobuf {

dependencies {
api project(':core')
api 'org.keycloak:keycloak-admin-client:19.0.3'
api 'org.keycloak:keycloak-admin-client:20.0.1'
api 'org.bouncycastle:bcprov-jdk15on:1.70'
api 'com.typesafe:config:1.4.2'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.avast.grpc.jwt.keycloak.server;

import com.avast.grpc.jwt.server.JwtTokenParser;
import com.google.common.base.Strings;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.stream.Collectors;

import org.keycloak.TokenVerifier;
import org.keycloak.common.VerificationException;
import org.keycloak.constants.ServiceUrlConstants;
Expand Down Expand Up @@ -63,10 +63,10 @@ protected TokenVerifier<AccessToken> createTokenVerifier(String jwtToken)
throws VerificationException {
TokenVerifier<AccessToken> verifier =
TokenVerifier.create(jwtToken, AccessToken.class).withChecks(checks);
if (!Strings.isNullOrEmpty(expectedAudience)) {
if (expectedAudience != null && !expectedAudience.isEmpty()) {
verifier = verifier.audience(expectedAudience);
}
if (!Strings.isNullOrEmpty(expectedIssuedFor)) {
if (expectedIssuedFor != null && !expectedIssuedFor.isEmpty()) {
verifier = verifier.issuedFor(expectedIssuedFor);
}
verifier.publicKey(publicKeyProvider.get(verifier.getHeader().getKeyId()));
Expand Down

0 comments on commit a9a3639

Please sign in to comment.