[keycloak-user] user panel everywhere - no automatic redirect
Stian Thorgersen
sthorger at redhat.com
Tue Aug 15 02:57:57 EDT 2017
Wouldn't
http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getUserPrincipal()
do the trick?
On 14 August 2017 at 17:22, Michal Keda <michal.keda at studentagency.cz>
wrote:
> Hello,
> I want to implement simple panel showing information about user logged
> into sso. The catch is that I need this panel even on pages that should
> not redirect to KC server when no user is logged in.
>
> This seems like basic behaviour for any homepage (show if user is logged
> in, but do not force immidiate redirect if isn't), but
> RefreshableKeycloakSecurityContext starts to pop up in my
> HttpServletRequest only after I access some protected page (specified in
> web.xml).
>
> So my question is (I guess..) if it is possible to get currently logged
> user, on page that is not protected by KC.
>
> I am using tomcat 7, java 8 (+wicket)
>
> Best regards,
>
> Michal Keda
> --
>
> Bc. Michal Keda
> programátor
>
> telefon: +420 539 000 711
>
> StudentAgency logo <https://www.studentagency.cz/>
> AUTOBUSY | <https://jizdenky.studentagency.cz/> VLAKY |
> <https://www.regiojet.cz/> DOVOLENÁ | <https://www.dovolena.cz/> LETENKY
> | <https://www.studentagency.cz/letenky/index.html> JAZYKOVÉ POBYTY |
> <https://www.jazykovepobyty.cz/> PRACOVNÍ A AU PAIR POBYTY
> <https://www.pracovnipobyty.cz/>
> STUDENT AGENCY k.s.
> Dům pánů z Lipé nám. Svobody 17
> 602 00 Brno infolinka: 800 100 300
> fax: +420 539 000 540 *www.studentagency.cz*
> <https://www.studentagency.cz>
> STUDENT AGENCY cestování pro každého v každém věku.
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
More information about the keycloak-user
mailing list