Search code examples
openam

Store OpenAM session attributes to cookie


From my understanding user session info for OpenAM only can be access by Session API. And we need to use post-auth plugin to extract those info and insert to cookie.

By question is: - Without using post-auth plugin, is that a way to configure OpenAM (via UI) return specific user session attribute(s) (eg. AuthType) to it's cookie?

Thanks


Solution

  • OpenAM policy agents can store session attributes to cookies or headers (see realm -> access control -> Agents -> Your agent -> application).

    The other option would be to use OAuth flows (Open Identity Connect) - which can present user attributes in a JWT token as part of the authentication process. Your client would have to decode the JWT token and extract the attributes.