Take a look at https://github.com/keycloak/keycloak/blob/master/adapters/oidc/js/src/main/resources/keycloak.js#L640, it's not just calling atob, it's doing some other stuff first.

On 14 April 2016 at 08:03, Stian Thorgersen <sthorger@redhat.com> wrote:
It's Base64 url encoded, so you need to use a Base64 url decoder, not a Base64 decoder

On 14 April 2016 at 07:38, Pavel Hora <phofficial@centrum.cz> wrote:

No one Base64 decoder can decode it. Even atob JS function, ...

 

 

______________________________________________________________
> Od: Stian Thorgersen <sthorger@redhat.com>
> Komu: Pavel Hora <phofficial@centrum.cz>
> Datum: 13.04.2016 20:43
> Předmět: Re: [keycloak-user] Token cant be decoded with base64
>

> CC: "keycloak-user"

It's base64 URL encoded which is slightly different, but only sometimes

On 13 Apr 2016 16:36, "Pavel Hora" <phofficial@centrum.cz> wrote:

...we have custom mapper of type user property with property value lastName

 

Full user name mapper type works fine

______________________________________________________________
> Od: "Pavel Hora" <phofficial@centrum.cz>
> Komu: <keycloak-user@lists.jboss.org>
> Datum: 13.04.2016 12:39
> Předmět: Token cant be decoded with base64
>

Hi,

 

we are using Keycloak 1.7.0 Final and for users with national characters in lastname (Očenášek) is not possible to decode generated token with base64. ...firstname is Lukáš

 

String[] splited = src_bad.split("\\.");

String srcToEnc = splited[1];

Decoder d = Base64.getDecoder();

d.decode(srcToEnc);

 

...Illegal base64 character

 

 

Any suggestion?

thx,

pH.


_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user

_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user