[keycloak-user] How do I get KeycloakSecurityContext to be set in the httpServletRequest in Keycloak's account-linking doc?

Alik Elzin kilaka at gmail.com
Mon Oct 2 01:06:08 EDT 2017


Hi.

In Keycloak's account-linking
<http://www.keycloak.org/docs/3.2/server_development/topics/identity-brokering/account-linking.html>
documentation,
there's a code snippet: KeycloakSecurityContext session =
(KeycloakSecurityContext)
httpServletRequest.getAttribute(KeycloakSecurityContext.class.getName()).

Why would the KeycloakSecurityContext be set in the httpServletRequest?
Where does this code should run? In what context?

Thanks.

* Also posted the question in SO:
https://stackoverflow.com/questions/46409356/how-do-i-get-keycloaksecuritycontext-to-be-set-in-the-httpservletrequest-in-keyc


More information about the keycloak-user mailing list