gjwt

package module
v0.0.0-...-72db084 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2016 License: BSD-2-Clause Imports: 13 Imported by: 0

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)
}

Documentation

Overview

Package gjwt validates Google JWT tokens using the list of public keys published. This list is kept up-to-date automatically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(tokenStr string) (*jwt.Token, error)

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).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL