forked from Mirrors/oauth2
d5ff5ab876
The current implementation of JWS/JWT in this package uses a fixed 1 hour expiry time for JWT tokens. Some services do not accept such a long expiry time, e.g. Salesforce, which defaults to a 5 minute expiry. https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_oauth_jwt_flow.htm This change adds an Expires time.Duration property to the jwt.Config struct that, if set, will be used to calculate the jws.ClaimSet Exp property. It allows a custom expiry to be set on a JWT token. This change is backward compatible and will revert to previous behaviour if the Expires property is not set. Fixes golang/oauth2#151 Change-Id: I3159ac2a5711ef10389d83c0e290bfc7a9f54015 Reviewed-on: https://go-review.googlesource.com/14681 Reviewed-by: Burcu Dogan <jbd@google.com> |
||
---|---|---|
.. | ||
example_test.go | ||
jwt.go | ||
jwt_test.go |