title: How can i decode JWT using Keycloak
body: <p>I am using Keycloak with Spring-Boot in my application. My browser client request keycloak to generate JWT and then sends this JWT to my ZUUL server which validates JWT using keycloak-spring adapter and then i have written a pre-filter to decodes JWT payload and extract username.
  I am using com.auth0.java-jwt library to decode JWT like in below snippet</p>
  
  <pre><code> DecodedJWT dJWT=JWT.decode(header);
   String username=dJWT.getClaim("preferred_username").asString();
  </code></pre>
  
  <p>I was wondering if there is anyway i can do this without using external library. I want to use keycloak library to decode JWT explicitly. How can i achieve this?</p>