Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                

myauthboss

package
v0.0.0-...-c581260 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2016 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthboss

func GetAuthboss() *authboss.Authboss

func RedirectMinio

func RedirectMinio(w http.ResponseWriter, r *http.Request, minioToken string)

func SetupAuthboss

func SetupAuthboss()

func SetupStorer

func SetupStorer()

Types

type CookieStorer

type CookieStorer struct {
	// contains filtered or unexported fields
}

func (CookieStorer) Del

func (s CookieStorer) Del(key string)

func (CookieStorer) Get

func (s CookieStorer) Get(key string) (string, bool)

func (CookieStorer) Put

func (s CookieStorer) Put(key, value string)

type MemStorer

type MemStorer struct {
	Users  map[string]User
	Tokens map[string][]string
}

func NewMemStorer

func NewMemStorer() *MemStorer

func (MemStorer) AddToken

func (s MemStorer) AddToken(key, token string) error

func (MemStorer) ConfirmUser

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

func (MemStorer) Create

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

func (MemStorer) DelTokens

func (s MemStorer) DelTokens(key string) error

func (MemStorer) Get

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

func (MemStorer) GetOAuth

func (s MemStorer) GetOAuth(uid, provider string) (result interface{}, err error)

func (MemStorer) Put

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

func (MemStorer) PutOAuth

func (s MemStorer) PutOAuth(uid, provider string, attr authboss.Attributes) error

func (MemStorer) RecoverUser

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

func (MemStorer) UseToken

func (s MemStorer) UseToken(givenKey, token string) error

type SessionStorer

type SessionStorer struct {
	// contains filtered or unexported fields
}

func (SessionStorer) Del

func (s SessionStorer) Del(key string)

func (SessionStorer) Get

func (s SessionStorer) Get(key string) (string, bool)

func (SessionStorer) Put

func (s SessionStorer) Put(key, value string)

type User

type User struct {
	ID   int
	Name string

	// Auth
	Email    string
	Password string

	// OAuth2
	Oauth2Uid      string
	Oauth2Provider string
	Oauth2Token    string
	Oauth2Refresh  string
	Oauth2Expiry   time.Time

	// Confirm
	ConfirmToken string
	Confirmed    bool

	// Lock
	AttemptNumber int64
	AttemptTime   time.Time
	Locked        time.Time

	// Recover
	RecoverToken       string
	RecoverTokenExpiry time.Time
}

Jump to

Keyboard shortcuts

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