0

I want to create a method for token verification which will send a request to the userinfo endpoint of keycloak and send me back, true or false.

true if the response status is 200 (OK)
false if the response status is 401 (Unauthorized)

I don't actually need the user info payload. Only the response status is required. How I can achieve this using spring boot 3

smilyface
  • 5,021
  • 8
  • 41
  • 57
  • Have you tried anything already to achieve this? – smilyface Jul 04 '23 at 10:23
  • Please share your current appraoches, thoughts, archivements,... so we can try to help. Anyway at the spring-boot environment you can introduce spring-security and a `SecurityFilterChain`. This will always be called on authentifications and there you can configure calls to keycloak. Keep in mind that you need to whitelist the client at keycloak and configure a fix name/token from application to keycloak to make it work. More hints after showing work done :) – LenglBoy Jul 04 '23 at 11:16

0 Answers0