Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
the description for this gist
def verifyToken(token: String): Future[Option[AccessToken]] = {
val tokenVerifier = RSATokenVerifier.create(token).realmUrl(keycloakDeployment.getRealmInfoUrl)
for {
publicKey <-
} yield publicKey match {
case Some(publicKey) =>
val token = tokenVerifier.publicKey(publicKey).verify().getToken
case None =>
log.warning(s"no public key found for id ${tokenVerifier.getHeader.getKeyId}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.