gojwt: github.com/nickvellios/gojwt Index | Files

package jwt

import "github.com/nickvellios/gojwt"


Package Files


func Decode Uses

func Decode(jwt string) (map[string]string, error)

Decode decodes a JWT and returns the payload as a map[string]string.

func DecodeFromCookie Uses

func DecodeFromCookie(r *http.Request, cookieName string) (map[string]string, error)

DecodeFromCookie extracts and decodes the JWT payload from a given http.Request and cookie name

func Generate Uses

func Generate(claim map[string]string, exp int) string

Generate compiles and signs a JWT from a claim and an expiration time in seconds from current time.

Package jwt imports 11 packages (graph). Updated 2018-03-17. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).