[keycloak-user] Retrieving the access token itself from org.keycloak.representations.AccessToken

Stian Thorgersen sthorger at redhat.com
Fri Sep 30 03:01:25 EDT 2016


The access token is not created yet at that point. You can't sign something
that's not completed ;)

A service account is the way to go, as you don't actually have a token yet,
you're in the progress of creating one.

On 30 September 2016 at 08:38, Aritz Maeztu <amaeztu at tesicnor.com> wrote:

> I have implemented my own mapper to add extra info in the
> transformAccessToken method. However, to fill the extra fields I would
> like to use the access token itself to access a remote security endpoint
> which is secured. However, I don't see any way to retrieve the base64
> encoded token from the org.keycloak.representations.AccessToken.java
> object.
>
> Currently my workaround is to access the remote endpoint using a service
> account, but I would like to take advantage of the token I already have.
>
> Is it possible?
>
>
> --
> Aritz Maeztu Otaño
> Departamento Desarrollo de Software
> <https://www.linkedin.com/in/aritz-maeztu-ota%C3%B1o-65891942>
> <http://www.tesicnor.com>
>
> Pol. Ind. Mocholi. C/Rio Elorz, Nave 13E 31110 Noain (Navarra)
> Telf. Aritz Maeztu: 948 68 03 06
> Telf. Secretaría: 948 21 40 40
>
> Antes de imprimir este e-mail piense bien si es necesario hacerlo: El
> medioambiente es cosa de todos.
>
> _______________________________________________
> 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