<div dir="ltr">Take a look at <a href="https://github.com/keycloak/keycloak/blob/master/adapters/oidc/js/src/main/resources/keycloak.js#L640">https://github.com/keycloak/keycloak/blob/master/adapters/oidc/js/src/main/resources/keycloak.js#L640</a>, it's not just calling atob, it's doing some other stuff first.</div><div class="gmail_extra"><br><div class="gmail_quote">On 14 April 2016 at 08:03, Stian Thorgersen <span dir="ltr"><<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It's Base64 url encoded, so you need to use a Base64 url decoder, not a Base64 decoder</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 14 April 2016 at 07:38, Pavel Hora <span dir="ltr"><<a href="mailto:phofficial@centrum.cz" target="_blank">phofficial@centrum.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p style="padding:0 0 0 0;margin:0 0 0 0">No one Base64 decoder can decode it. Even atob JS function, ...</p>
<p style="padding:0 0 0 0;margin:0 0 0 0"> </p>
<p style="padding:0 0 0 0;margin:0 0 0 0"> </p>
<p style="padding:0 0 0 0;margin:0 0 0 0">______________________________________________________________<br>
> Od: Stian Thorgersen <<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>><br>
> Komu: Pavel Hora <<a href="mailto:phofficial@centrum.cz" target="_blank">phofficial@centrum.cz</a>><br>
> Datum: 13.04.2016 20:43<br>
> Předmět: Re: [keycloak-user] Token cant be decoded with base64<br>
></p>
<p style="padding:0 0 0 0;margin:0 0 0 0">> CC: "keycloak-user"</p><div><div>
<p dir="ltr">It's base64 URL encoded which is slightly different, but only sometimes</p>
<div class="gmail_quote">On 13 Apr 2016 16:36, "Pavel Hora" <<a href="mailto:phofficial@centrum.cz" target="_blank">phofficial@centrum.cz</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p style="padding:0 0 0 0;margin:0 0 0 0">...we have custom mapper of type user property with property value lastName</p>
<p style="padding:0 0 0 0;margin:0 0 0 0"> </p>
<p style="padding:0 0 0 0;margin:0 0 0 0">Full user name mapper type works fine</p>
<p style="padding:0 0 0 0;margin:0 0 0 0">______________________________________________________________<br>
> Od: "Pavel Hora" <<a href="mailto:phofficial@centrum.cz" target="_blank">phofficial@centrum.cz</a>><br>
> Komu: <<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>><br>
> Datum: 13.04.2016 12:39<br>
> Předmět: Token cant be decoded with base64<br>
></p>
<p style="padding:0 0 0 0;margin:0 0 0 0">Hi,</p>
<p style="padding:0 0 0 0;margin:0 0 0 0"> </p>
<p style="padding:0 0 0 0;margin:0 0 0 0">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áš</p>
<p style="padding:0 0 0 0;margin:0 0 0 0"> </p>
<p style="padding:0 0 0 0;margin:0 0 0 0">String[] splited = src_bad.split("\\.");</p>
<p style="padding:0 0 0 0;margin:0 0 0 0">String srcToEnc = splited[1];</p>
<p style="padding:0 0 0 0;margin:0 0 0 0">Decoder d = Base64.getDecoder();</p>
<p style="padding:0 0 0 0;margin:0 0 0 0">d.decode(srcToEnc);</p>
<p style="padding:0 0 0 0;margin:0 0 0 0"> </p>
<p style="padding:0 0 0 0;margin:0 0 0 0">...Illegal base64 character</p>
<p style="padding:0 0 0 0;margin:0 0 0 0"> </p>
<p style="padding:0 0 0 0;margin:0 0 0 0"> </p>
<p style="padding:0 0 0 0;margin:0 0 0 0">Any suggestion?</p>
<p style="padding:0 0 0 0;margin:0 0 0 0"><span style="font-size:10pt">thx,</span></p>
<p style="padding:0 0 0 0;margin:0 0 0 0"><span style="font-size:10pt">pH.</span></p>
<br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></blockquote>
</div>
</div></div><br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>