auth

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2016 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCookieStorer

func NewCookieStorer(w http.ResponseWriter, r *http.Request) authboss.ClientStorer

func NewSessionStorer

func NewSessionStorer(w http.ResponseWriter, r *http.Request) authboss.ClientStorer

Types

type AuthbossUser

type AuthbossUser struct {

	// Auth
	Email    string `bson:"-"`
	Password string `bson:"-"`

	// OAuth2
	Oauth2Uid      string    `bson:",omitempty"`
	Oauth2Provider string    `bson:",omitempty"`
	Oauth2Token    string    `bson:",omitempty"`
	Oauth2Refresh  string    `bson:",omitempty"`
	Oauth2Expiry   time.Time `bson:",omitempty"`

	// Confirm
	ConfirmToken string `bson:",omitempty"`
	Confirmed    bool   `bson:",omitempty"`

	// Lock
	AttemptNumber int64     `bson:",omitempty"`
	AttemptTime   time.Time `bson:",omitempty"`
	Locked        time.Time `bson:",omitempty"`

	// Recover
	RecoverToken       string    `bson:",omitempty"`
	RecoverTokenExpiry time.Time `bson:",omitempty"`
	// contains filtered or unexported fields
}

func (*AuthbossUser) Basic

func (u *AuthbossUser) Basic() *userdb.BasicUser

type Storer

type Storer struct {
	*broker.Broker
}

func NewStorer

func NewStorer(br *broker.Broker) Storer

func (Storer) ConfirmUser

func (s Storer) ConfirmUser(tok string) (result interface{}, err error)

func (Storer) Create

func (s Storer) Create(key string, attr authboss.Attributes) error

func (Storer) Get

func (s Storer) Get(key string) (result interface{}, err error)

func (Storer) Put

func (s Storer) Put(key string, attr authboss.Attributes) error

func (Storer) RecoverUser

func (s Storer) RecoverUser(rec string) (result interface{}, err error)

Jump to

Keyboard shortcuts

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