In my rest service i can obtain the principal information after authentication using
KeycloakPrincipal kcPrincipal = (KeycloakPrincipal) servletRequest.getUserPrincipal();
statement.
Keycloak principal does'nt cotain all the information i need about the authenticated user.
Is it possibile to customize my own principal type?
On the keycloak-server-end i ve developed a user federation provider. I saw that UserModel makes possible to add a set of custom attributes to my user.
Is it possibile to insert my custom principal in that code?
Is it possible to retrieve this attributes from keycloak principal?
What is the way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…