authentication

package
v0.0.0-...-aa13637 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForgetPassword

func ForgetPassword(c *gin.Context)

func Login

func Login(c *gin.Context)

Login check username and password in request body json and returns access_token and refresh_token

func Logout

func Logout(c *gin.Context)

Logout checks both accessToken in "Authorization" Header ( use middleware ) and refreshToken in request body json and delete the refreshToken from database

func RefreshToken

func RefreshToken(c *gin.Context)

RefreshToken checks refreshToken and return a new accessToken

func Register

func Register(c *gin.Context)

Register handles POST /register which create a user

func ResetPassword

func ResetPassword(c *gin.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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