jwt

package
v0.0.0-...-5d38250 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2018 License: MIT Imports: 5 Imported by: 3

Documentation

Overview

Package jwt provides a service to create and verify JWT auth tokens for the bebop web app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	Create(userID int64) (token string, err error)
	Verify(token string) (userID int64, issuedAt time.Time, err error)
}

Service is a JWT helper service that creates and verifies auth tokens.

func NewService

func NewService(secret string) (Service, error)

NewService creates a new JWT service using the given secret (32-byte hex-encoded).

Jump to

Keyboard shortcuts

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