auth

package
v0.0.0-...-b6ef80e Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2015 License: MIT Imports: 8 Imported by: 3

Documentation

Overview

auth

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authentificator

func Authentificator(options ...Options) macaron.Handler

func IsGranted

func IsGranted(action string, sess session.Store, auth *Auth) bool

func IsLogged

func IsLogged(ctx *macaron.Context, sess session.Store, auth *Auth)

func LogOut

func LogOut(ctx *macaron.Context, sess session.Store)

func SignIn

func SignIn(ctx *macaron.Context, sess session.Store, auth *Auth)

Types

type Auth

type Auth struct {
	// contains filtered or unexported fields
}

func New

func New(db *db.Db) *Auth

func (*Auth) GetRoles

func (this *Auth) GetRoles() []string

GetRoles return the list of roles defined in this class

func (*Auth) IsGranted

func (this *Auth) IsGranted(action string, sess session.Store) bool

func (*Auth) VerificationAuth

func (auth *Auth) VerificationAuth(ctx *macaron.Context, sess session.Store, needed []string) error

VerificationAuth verify if the needed are filled

type Options

type Options struct {
	// Name of provider for the rules.
	Provider *db.Db
}

Options represents a struct for specifying configuration options for the session middleware.

Jump to

Keyboard shortcuts

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