title: Decode JWT encoded string from Google in PHP
body: <p>I am upgrading my Google based login system, which requires me to decode <code>id_token</code> strings supplied by Google. The strings are valid, and I can decode them via: <a href="https://developers.google.com/wallet/digital/docs/jwtdecoder" rel="nofollow">https://developers.google.com/wallet/digital/docs/jwtdecoder</a></p>
  
  <p>But I want my server to do this on the fly in PHP.</p>
  
  <p>I found both: <a href="https://github.com/firebase/php-jwt/tree/master" rel="nofollow">https://github.com/firebase/php-jwt/tree/master</a> and <a href="https://github.com/luciferous/jwt" rel="nofollow">https://github.com/luciferous/jwt</a></p>
  
  <p>But I cannot figure out how to work with PEAR packages. Simple PHP scripts to copy to my server I can do, but I find the documentation given with these 2 packages very limited. Does anybody have sample code on how to decode such a string?</p>
  
  <p>Any help would be much appreciated.</p>