jwtlib

package
v0.0.0-...-d7a0030 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJwtToken

func CreateJwtToken(AuthToken, KeyFilePrivate string) (rv string, err error)

CreateJwtToken will sign a JWT token, with auth_token as a claim inside it. func CreateJwtToken(AuthToken string) (rv JwtToken, err error) {

func SignToken

func SignToken(tokData []byte, keyFilePrivate string) (out string, err error)

SignToken Create, sign, and output a token. This is a great, simple example of how to use this library to create and sign a token.

func VerifyToken

func VerifyToken(tokData []byte, keyFile string) (authToken string, err error)

VerifyToken takes a jwt-token and output the auth_token from the claims. The token's signature is verified. `authToken` is the auth_token in the claims.

Types

This section is empty.

Jump to

Keyboard shortcuts

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