handlertest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SingleRouteRouter

type SingleRouteRouter router.Router

SingleRouteRouter is a router that only serves with a single handler, regardless of the requested action.

func NewSingleRouteRouter

func NewSingleRouteRouter(handler router.Handler, prepareFunc func(*router.Payload)) *SingleRouteRouter

NewSingleRouteRouter creates a SingleRouteRouter, mapping the specified handler as the only route.

func (*SingleRouteRouter) POST

POST invoke the only route mapped on the SingleRouteRouter.

type SingleUserAuthProvider

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

SingleUserAuthProvider is an AuthProvider that only authenticates a single user if the auth data provided contains the required principal name.

func NewSingleUserAuthProvider

func NewSingleUserAuthProvider(providerName string, principalName string) *SingleUserAuthProvider

NewSingleUserAuthProvider creates a new instance of SingleUserAuthProvider.

func (*SingleUserAuthProvider) Info

func (p *SingleUserAuthProvider) Info(authData map[string]interface{}) (newAuthData map[string]interface{}, err error)

Info implements the AuthProvider's Info interface.

func (*SingleUserAuthProvider) Login

func (p *SingleUserAuthProvider) Login(authData map[string]interface{}) (principalID string, newAuthData map[string]interface{}, err error)

Login implements the AuthProvider's Login interface.

func (*SingleUserAuthProvider) Logout

func (p *SingleUserAuthProvider) Logout(authData map[string]interface{}) (newAuthData map[string]interface{}, err error)

Logout implements the AuthProvider's Logout interface.

Jump to

Keyboard shortcuts

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