authboss: alab.us/open-source-forks/authboss/remember Index | Files

package remember

import "alab.us/open-source-forks/authboss/remember"

Package remember implements persistent logins through the cookie storer.

Index

Package Files

remember.go

type Remember Uses

type Remember struct {
    *authboss.Authboss
}

Remember module

func (*Remember) Initialize Uses

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

Initialize module

func (*Remember) Routes Uses

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

Routes for module

func (*Remember) Storage Uses

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

Storage requirements

type RememberStorer Uses

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.

Package remember imports 8 packages (graph). Updated 2020-08-04. Refresh now. Tools for package owners.