auth

package
v0.0.0-...-f67effe Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePassword

func GeneratePassword(password string) string

func IsPasswordCorrect

func IsPasswordCorrect(pass, expected string) bool

func NewAPIKey

func NewAPIKey(apitype, username string, superuser bool) string

func ParseAPIKey

func ParseAPIKey(tokenstr string) *jwt.Token

Types

type MyClaims

type MyClaims struct {
	Apitype  string `json:"t,omitempty"`
	User     string `json:"u,omitempty"`
	Super    bool   `json:"s,omitempty"`
	IssuedAt int64  `json:"i,omitempty"`
	Expiry   int64  `json:"e,omitempty"`
}

func (MyClaims) Valid

func (c MyClaims) Valid() error

Jump to

Keyboard shortcuts

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