Search code examples
javaspring-bootauthorizationokta

How to get user info from okta access token or id token?


We are having an api gate way that requests user authentication using okta and then it redirects the request to a specific service, and sending it an authorization bearer token.

My question here is that how from this authorization bearer token we got in the service, we can get the user info using java spring boot?


Solution

  • Depending on scopes requested, your service can request user information from authZ server (Okta) presenting received access token (call to /userinfo endpoint).

    Sometimes it can be configured on authZ server to inject additional claims into access/id tokens from a user profile, so that what I described above can be omitted