firebase/php-jwt — pull request #7 by jlesueur (2014-06-19 14:20:29+00:00)
Title: Make it easier to use JWT with OpenIdConnect.

Add a method to retrieve the header. OpenIdConnect tends to add a "kid" to the header that is used to determine which key to use for verification. Getting header information allows you to figure out which key to pass to "decode". Other possible ways to handle this, allow $key passed to decode to be an array of keys. For now, I thought we should just let people get to the header.

I'm not sure about the duplication of code and effort in decodeHeader and decode, but this is the simplest way to get the functionality without changing the basic workflow.

Sorry about the whitespace added, I can remove it if you like the idea otherwise.