auth

package
v0.0.0-...-46021d3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: MIT Imports: 9 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 Claims

type Claims struct {
	Username string `json:"username"`
	jwt.StandardClaims
}

Claims is a claims model

type Credentials

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

Credentials are the credentials used for auth

Jump to

Keyboard shortcuts

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