session

package
v3.8.0-alpha.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ExpiresKey = "expires"
View Source
const UserNameKey = "user.name"
View Source
const UserUIDKey = "user.uid"

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

func NewAuthenticator

func NewAuthenticator(store Store, name string, maxAge int) *Authenticator

func (*Authenticator) AuthenticateRequest

func (a *Authenticator) AuthenticateRequest(req *http.Request) (user.Info, bool, error)

func (*Authenticator) AuthenticationSucceeded

func (a *Authenticator) AuthenticationSucceeded(user user.Info, state string, w http.ResponseWriter, req *http.Request) (bool, error)

func (*Authenticator) InvalidateAuthentication

func (a *Authenticator) InvalidateAuthentication(w http.ResponseWriter, req *http.Request) error

type Session

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

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(secure bool, secrets ...string) Store

Jump to

Keyboard shortcuts

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