auth

package
v0.0.0-...-88b2b22 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppClaims

type AppClaims struct {
	ID uint `json:"id,omitempty"`
	//Roles []string `json:"roles,omitempty"`
	jwt.StandardClaims
}

type Authenticator

type Authenticator interface {
	ParseToken(token string) (*AppClaims, error)
	GenerateToken(id uint) (string, error)
}

func NewAuthenticator

func NewAuthenticator(secretKey string) Authenticator

Jump to

Keyboard shortcuts

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