public Claims getTokenClaims(String token) {
getIssuerDetails().flatMap(i -> {
return Jwts.parser()
.verifyWith(getPublicKeyFromString(i.getPublic_key()))
.build()
.parseSignedClaims(token)
.getPayload();
}
);
}
i'm making a webclient call getIssuerDetails, and the response of that contains publicKey which i'm trying to pass into a jwts.parser and return the Claims.
public Mono<KeycloakIssuerDetails> getIssuerDetails(){
URI getPublicKeyURI = UriComponentsBuilder.fromHttpUrl(getIssuer()).build().toUri();
return this.keycloakWebClient.get()
.uri(getPublicKeyURI)
.retrieve()
.bodyToMono(KeycloakIssuerDetails.class);
}