remember

package
v0.0.0-...-83c72ea Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package remember implements persistent logins through the cookie storer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Remember

type Remember struct {
	*authboss.Authboss
}

Remember module

func (*Remember) Initialize

func (r *Remember) Initialize(ab *authboss.Authboss) error

Initialize module

func (*Remember) Routes

func (r *Remember) Routes() authboss.RouteTable

Routes for module

func (*Remember) Storage

func (r *Remember) Storage() authboss.StorageOptions

Storage requirements

type RememberStorer

type RememberStorer interface {
	// AddToken saves a new token for the key.
	AddToken(key, token string) error
	// DelTokens removes all tokens for a given key.
	DelTokens(key string) error
	// UseToken finds the key-token pair, removes the entry in the store
	// and returns nil. If the token could not be found return ErrTokenNotFound.
	UseToken(givenKey, token string) (err error)
}

RememberStorer must be implemented in order to satisfy the remember module's storage requirements. If the implementer is a typical database then the tokens should be stored in a separate table since they require a 1-n with the user for each device the user wishes to remain logged in on.

Remember storer will look at both authboss's configured Storer and OAuth2Storer for compatibility.

Jump to

Keyboard shortcuts

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