Created
February 9, 2018 22:17
-
-
Save bandrzejczak/bc6fc7dd5adf0bd9ee2fdcc7bd3d7e3f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class KeycloakTokenVerifier(keycloakDeployment: KeycloakDeployment) extends TokenVerifier { | |
| implicit val executionContext = ExecutionContext.fromExecutor(new ForkJoinPool(2)) | |
| def verifyToken(token: String): Future[String] = { | |
| Future { | |
| RSATokenVerifier.verifyToken( | |
| token, | |
| keycloakDeployment.getRealmKey, | |
| keycloakDeployment.getRealmInfoUrl | |
| ).getPreferredUsername | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment