Top 2.0% dependent packages on proxy.golang.org
Top 1.2% dependent repos on proxy.golang.org
Top 5.0% forks on proxy.golang.org
proxy.golang.org : github.com/someone1/gcp-jwt-go
Package gcpjwt has Google Cloud Platform (Cloud KMS, IAM API, & AppEngine App Identity API) jwt-go implementations. Should work across virtually all environments, on or off of Google's Cloud Platform. It is highly recommended that you override the default algorithm implementations that you want to leverage a GCP service for in dgrijalva/jwt-go. You otherwise will have to manually pick the verification method for your JWTs and they will place non-standard headers in the rendered JWT (with the exception of signJwt from the IAM API which overwrites the header with its own). You should only need to override the algorithm(s) you plan to use. It is also incorrect to override overlapping, algorithms such as `gcpjwt.SigningMethodKMSRS256.Override()` and `gcpjwt.SigningMethodIAMJWT.Override()` Example: As long as a you override a default algorithm implementation as shown above, using the dgrijalva/jwt-go is mostly unchanged. Token creation is more/less done the same way as in the dgrijalva/jwt-go package. The key that you need to provide is always going to be a context.Context, usuaully with a configuration object loaded in: Example: Finally, the steps to validate a token should be straight forward. This library provides you with helper jwt.Keyfunc implementations to do the heavy lifting around getting the public certificates for verification: Example:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/someone1/gcp-jwt-go
License: MIT
Latest release: almost 7 years ago
First release: almost 7 years ago
Namespace: github.com/someone1
Dependent packages: 7
Dependent repositories: 20
Stars: 75 on GitHub
Forks: 19 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 2 days ago