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: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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