account

package
v0.0.0-...-76f8149 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CookieSessionId = "session_id"
	CookieMaxAge    = 30 * 24 * 3600
)
View Source
const (
	MercuryUserId          = "user_id"
	MercuryUserLoginStatus = "login_status"
	MercurySessionName     = "mercury_session"
)

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(c *gin.Context)

func GetUserId

func GetUserId(ctx *gin.Context) (userId int64, err error)

func InitSession

func InitSession(provider string, addr string, options ...string) (err error)

func IsLogin

func IsLogin(ctx *gin.Context) (login bool)

func ProcessRequest

func ProcessRequest(ctx *gin.Context)

func ProcessResponse

func ProcessResponse(ctx *gin.Context)

func SetUserId

func SetUserId(userId int64, ctx *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