how to include authenticated user's roles in JWT?

48 views
Skip to first unread message

dg

unread,
Jun 1, 2020, 9:25:49 AM6/1/20
to CAS Community
hello,

i have configured cas as oauth2 server. after successfull login, it returns JWT, but roles filed in jwt is always empty [].

how can fetch and put authenticated user's role in JWT?

thanks for helps.

dg

unread,
Jun 4, 2020, 10:25:49 AM6/4/20
to CAS Community
hello, i am really stuck with it. anybody experiencing a similar issue? or suggesting a solution?

1 Haziran 2020 Pazartesi 16:25:49 UTC+3 tarihinde dg yazdı:

Jérôme Steve

unread,
Jun 5, 2020, 3:17:58 AM6/5/20
to cas-...@apereo.org
Hello DG,

You have to pût it un the attributsrRepository from jour db or ldap. After you can get it, in ths jwt token.

Something l'île this :

Jérôme.


--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/db601ad7-3074-4d88-bb86-d3f90adc5181%40apereo.org.

Jérôme Steve

unread,
Jun 5, 2020, 3:21:07 AM6/5/20
to cas-...@apereo.org
Sorry in english,

You have to put it in the attributes repository from our db or your ldap (or something else). After that you can get it in the jwt token.

Something like this :
Jérôme.

Le jeu. 4 juin 2020 à 16:25, dg <ytete...@gmail.com> a écrit :
--

dg

unread,
Jun 5, 2020, 8:30:33 AM6/5/20
to CAS Community
hey, thank you so much for suggesting. i search your suggestion and i found solution and explain there https://stackoverflow.com/questions/62155196/how-to-include-authenticated-users-roles-in-jwt/62215364#62215364


1 Haziran 2020 Pazartesi 16:25:49 UTC+3 tarihinde dg yazdı:
hello,
Reply all
Reply to author
Forward
0 new messages