auth

package
v0.0.0-...-f5c6dce Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoLogin

func DoLogin(username string, password string, c echo.Context) error

DoLogin checks credentials and logs in a user

func Logout

func Logout(c echo.Context) error

Logout logs out the current user

func Middleware

func Middleware(next echo.HandlerFunc) echo.HandlerFunc

Middleware is the middleware function.

Types

type User

type User struct {
	Name string
	Role string
}

User ...

func LoggedUser

func LoggedUser(c echo.Context) (*User, error)

LoggedUser return the user associated with the current session

Jump to

Keyboard shortcuts

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