session

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2014 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 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

Index

Constants

View Source
const UserNameKey = "user.name"

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session interface {
	Values() map[interface{}]interface{}
}

type SessionAuthenticator

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

func NewSessionAuthenticator

func NewSessionAuthenticator(store Store, name string) *SessionAuthenticator

func (*SessionAuthenticator) AuthenticateRequest

func (a *SessionAuthenticator) AuthenticateRequest(req *http.Request) (api.UserInfo, bool, error)

func (*SessionAuthenticator) AuthenticationSucceeded

func (a *SessionAuthenticator) AuthenticationSucceeded(user api.UserInfo, state string, w http.ResponseWriter, req *http.Request) error

func (*SessionAuthenticator) InvalidateAuthentication

func (a *SessionAuthenticator) InvalidateAuthentication(context api.UserInfo, w http.ResponseWriter, req *http.Request) error

type Store

type Store interface {
	Get(r *http.Request, name string) (Session, error)
	Save(http.ResponseWriter, *http.Request) error
	Wrap(http.Handler) http.Handler
}

func NewStore

func NewStore(secrets ...string) Store

Jump to

Keyboard shortcuts

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