auth

package
v0.0.0-...-9e07620 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(hash []byte, password string) error

CheckPassword checks to see if the password matches the hashed password.

func GetAuthorization

func GetAuthorization(ctx context.Context) (*jwt.Token, error)

func GetScopes

func GetScopes(token *jwt.Token) ([]string, error)

func GetSubject

func GetSubject(token *jwt.Token) (string, error)

func GetTokenID

func GetTokenID(token *jwt.Token) (string, error)

func HashPassword

func HashPassword(password string) []byte

func Middleware

func Middleware(ipId, domain string) *jwtmiddleware.JWTMiddleware

func New

func New(db models.DBType) http.Handler

func SecureToken

func SecureToken() string

Types

type CustomClaims

type CustomClaims struct {
	Scope string `json:"scope"`
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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