auth

package
v0.0.0-...-642f069 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteSessionCookie

func DeleteSessionCookie(c echo.Context)

func Middleware

func Middleware(db *pg.DB) echo.MiddlewareFunc

Middleware returns a Session middleware.

func SetSessionCookie

func SetSessionCookie(c echo.Context, sid string)

Types

type Details

type Details struct {
	UserID string
	User   *user.User
}

func FromContext

func FromContext(ctx context.Context) (*Details, bool)

FromContext returns an Details from the given context.Context, if any.

func FromEchoContext

func FromEchoContext(c echo.Context) (*Details, bool)

FromEchoContext returns an Details from the given echo.Context, if any. It fetches the Details on the underlying context.Context.

func (*Details) WithContext

func (d *Details) WithContext(ctx context.Context) context.Context

func (*Details) WithEchoContext

func (d *Details) WithEchoContext(c echo.Context) echo.Context

Jump to

Keyboard shortcuts

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