auth

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JwtKey = []byte("my_secret_key")

JwtKey is the JSONWebToken key used for auth

Functions

func Refresh

func Refresh(w http.ResponseWriter, r *http.Request)

Refresh is used for refreshing the token

func SignUp

func SignUp(w http.ResponseWriter, r *http.Request)

SignUp is used for signing up

func Signin

func Signin(w http.ResponseWriter, r *http.Request)

Signin is used for signing in

Types

type Credentials

type Credentials struct {
	Password string `json:"password"`
	Username string `json:"username"`
}

Credentials are the credentials used for auth

type GoQRSClaims

type GoQRSClaims struct {
	ID       int64  `json:"id"`
	Username string `json:"username"`
	Role     string `json:"role"`
	jwt.StandardClaims
}

GoQRSClaims is a claims model

Jump to

Keyboard shortcuts

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