Version: v0.0.0-...-5ddf3d3 Latest Latest

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 8 Imported by: 0



Package remember implements persistent logins through the cookie storer.



This section is empty.


This section is empty.


This section is empty.


type Remember

type Remember struct {

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