Hi, In my JAVA web application, i am moving from redhat redhat SSO to OKTA.
I am able to redirect to OKTA server login page when my application URL is hit in the URL.OKTA server is being authenticated with the username and password entered and my application is redirecting to.
Now I am trying to find how to get that authenticated session or authenticated user details in java code.
I saw the blog post.
My question is how to get the username in the first place from okta login page. My httprequest in the servlet filter is not having those details. I am getting code and state returned in the response when okta authenticates.
If you are just looking for the username you should be able to retrieve that from the “preferred_username” claim in the ID token. That’s simpler than the second step of going to /userinfo if that is all you are looking for.