user

package
v0.0.0-...-a6721f7 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("user not found")

Functions

This section is empty.

Types

type Store

type Store interface {
	Get(id, provider string) (*User, error)
	Save(*User) error
	Update(*User) error
}

UserStore provides an interface for storing Users

type User

type User struct {
	RawData           map[string]interface{}
	Provider          string
	Email             string
	Name              string
	FirstName         string `bson:"first_name"`
	LastName          string `bson:"last_name"`
	NickName          string `bson:"nick_name"`
	Description       string
	UserID            string `bson:"userid"`
	AvatarURL         string `bson:"avatar_url"`
	Location          string
	AccessToken       string    `bson:"access_token"`
	AccessTokenSecret string    `bson:"access_token_secret"`
	RefreshToken      string    `bson:"refresh_token"`
	ExpiresAt         time.Time `bson:"expires_at"`
}

User contains the information common amongst most OAuth and OAuth2 providers. All of the "raw" datafrom the provider can be found in the `RawData` field.

func FromGothic

func FromGothic(g *goth.User) *User

FromGothic converts a Gothic user to an Athens user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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