controllers

package
v0.0.0-...-cd8ce68 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FilterUser = func(ctx *context.Context) {
	_, ok := ctx.Input.Session(sessionName).(int)
	if !ok && ctx.Input.Uri() != "/login" && ctx.Input.Uri() != "/register" {
		ctx.Redirect(302, "/login")
	}
}

customize filters for fine grain authorization

Functions

func HasUser

func HasUser(user *models.User, username string) bool

func VerifyPassword

func VerifyPassword(rawPwd, encodedPwd string) bool

func VerifyUser

func VerifyUser(user *models.User, username, password string) (success bool)

Types

type LoginController

type LoginController struct {
	beego.Controller
}

func (*LoginController) AppView

func (this *LoginController) AppView()

func (*LoginController) Login

func (this *LoginController) Login()

func (*LoginController) LoginView

func (this *LoginController) LoginView()

func (*LoginController) Logout

func (this *LoginController) Logout()

func (*LoginController) Register

func (this *LoginController) Register()

func (*LoginController) RegisterView

func (this *LoginController) RegisterView()

type MainController

type MainController struct {
	beego.Controller
}

func (*MainController) Get

func (c *MainController) Get()

Jump to

Keyboard shortcuts

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