Discover Packages
github.com/fcvarela/gjwt
package
module
Version:
v0.0.0-...-72db084
Opens a new window with list of versions in this module.
Published: May 18, 2016
License: BSD-2-Clause
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
gjwt
gjwt validates Google JWT tokens using the list of public keys published. This list is kept up-to-date automatically.
Install
go get -u github.com/fcvarela/gjwt
Usage
if token, err := gjwt.Validate(tokenHere); err == nil {
clientid, ok := token.Claims["aud"].(string)
}
Expand ▾
Collapse ▴
Documentation
¶
Package gjwt validates Google JWT tokens using the list of public keys published. This list is kept up-to-date automatically.
Validate validates a JWT token against Google's public keys. It returns a *jwt.Token if successful. The caller of this function _must_ validate that the correct "aud" claim is set (see confused deputy problem).
Source Files
¶
Click to show internal directories.
Click to hide internal directories.