Allow JWT signing method to be configurable.
This change creates a new Signer interface which encapsulates jwt.SigningMethod + the key material use to sign JWT tokens.
This allows clients to modify how JWT tokens are signed by passing in their own Signer. In particular, I'm interested in coupling this with something like https://github.com/golang-jwt/jwt#extensions to allow for JWT signing backed by KMS systems (Vault, Cloud KMS, etc) where the private key never resides on the local client.
Introduces a new AppsTransportOptions to make it easier to make new transport creation options without needing to make new funcs each time. For now only added WithSigner, but we could easily extend this out to other config options (Client, BaseURL, etc.)
Finally, upgrades deprecated jwt.StandardClaims -> jwt.RegisteredClaims.
This looks good and the I like the AppsTransportOptions. The smallest nit would be whether you wanted to add something to README.
Sure thing! Coming right up.
@bradleyfalzon This is good for another look! 🙏
@bradleyfalzon ping for review
Sorry @wlynch! I've completely missed this, should we merge? It looks good to me.
oh sure! (I also forgot about this 😅 )