[keycloak-dev] Retrieving the current logged in username

Bruno Oliveira bruno at abstractj.org
Tue Jun 10 10:20:29 EDT 2014


Created https://issues.jboss.org/browse/KEYCLOAK-523

Thanks Bill.

On 2014-06-10, Bill Burke wrote:
> Log a JIRA please?  I'll add that to the Beta 3 todo list.
>
> On 6/9/2014 10:33 PM, Bruno Oliveira wrote:
> > Thanks Bill and Stan.
> >
> > This is what I've been trying to do[1]. Unfortunately after a user is
> > successfully authenticated the method ".getUserPrincipal" returns null.
> >
> > I saw an issue reported with old versions of Resteasy[2], but the NPE persists even
> > after upgrade the project to the latest version.
> >
> > [1] - https://github.com/abstractj/aerogear-unifiedpush-server/commit/de1f50370f4c339ad394b94def377a4c0072988b#diff-2ab40ceec347387de26ff2d7cab8ecb3R56
> > [2] - https://issues.jboss.org/browse/AS7-3227
> >
> > On 2014-06-09, Stan Silvert wrote:
> >> You are probably looking for KeycloakSecurityContext.getToken().getPreferredUsername()?
> >>
> >>
> >> On 6/9/2014 5:39 PM, Bruno Oliveira wrote:
> >>> Good morning guys,
> >>>
> >>> Which way is the best to retrieve the current logged in username? I'm
> >>> trying with KeycloakSecurityContext, but no luck.
> >>>
> >>> Thanks in advance.
> >>>
> >>> --
> >>>
> >>> abstractj
> >>> _______________________________________________
> >>> keycloak-dev mailing list
> >>> keycloak-dev at lists.jboss.org
> >>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >>
> >> _______________________________________________
> >> keycloak-dev mailing list
> >> keycloak-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >
> > --
> >
> > abstractj
> > _______________________________________________
> > keycloak-dev mailing list
> > keycloak-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev

--

abstractj


More information about the keycloak-dev mailing list