tokens

package
v0.0.0-...-6a5da2a Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Manager is the current token manager
	Manager manager
)

Functions

func Decrypt

func Decrypt(data []byte, key []byte) ([]byte, error)

Decrypt a byte array with AES

func Encrypt

func Encrypt(data []byte, key []byte) ([]byte, error)

Encrypt a byte array with AES

func Init

func Init(keyfile string, debug bool)

Init inits the main token manager

Types

type Token

type Token struct {
	ExpiresAt int64
	IssuedAt  int64 `json:"iat,omitempty"`
	Data      []byte
}

Token represents a token containting data

Jump to

Keyboard shortcuts

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