token

package module
v0.0.0-...-4f9f5f2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: Unlicense Imports: 7 Imported by: 0

README

jackmarshalll/token

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignHS256

func SignHS256(claims Claims, secret []byte) (string, error)

SignHS256 encode a set of claims in a HS256 encoded token.

Types

type Claims

type Claims map[string]interface{}

Claims is the type of the token's body. It is basically an alias of map to be more readable and easy to use.

func ParseHS256

func ParseHS256(token string, secret []byte) (Claims, error)

ParseHS256 parse and validate a HS256-encoded token. For now, it doesn't check anything else than the signature.

Jump to

Keyboard shortcuts

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