store

package
v3.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileTokenStore added in v3.3.1

func NewFileTokenStore(filename string) (store oauth2.TokenStore, err error)

NewFileTokenStore create a token store instance based on file

func NewMemoryTokenStore

func NewMemoryTokenStore() (store oauth2.TokenStore, err error)

NewMemoryTokenStore create a token store instance based on memory

Types

type ClientStore added in v3.6.0

type ClientStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

ClientStore client information store

func NewClientStore added in v3.6.0

func NewClientStore() *ClientStore

NewClientStore create client store

func (*ClientStore) GetByID added in v3.6.0

func (cs *ClientStore) GetByID(id string) (cli oauth2.ClientInfo, err error)

GetByID according to the ID for the client information

func (*ClientStore) Set added in v3.6.0

func (cs *ClientStore) Set(id string, cli oauth2.ClientInfo) (err error)

Set set client information

type TokenStore added in v3.3.1

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

TokenStore token storage based on buntdb(https://github.com/tidwall/buntdb)

func (*TokenStore) Create added in v3.3.1

func (ts *TokenStore) Create(info oauth2.TokenInfo) (err error)

Create create and store the new token information

func (*TokenStore) GetByAccess added in v3.3.1

func (ts *TokenStore) GetByAccess(access string) (ti oauth2.TokenInfo, err error)

GetByAccess use the access token for token information data

func (*TokenStore) GetByCode added in v3.4.1

func (ts *TokenStore) GetByCode(code string) (ti oauth2.TokenInfo, err error)

GetByCode use the authorization code for token information data

func (*TokenStore) GetByRefresh added in v3.3.1

func (ts *TokenStore) GetByRefresh(refresh string) (ti oauth2.TokenInfo, err error)

GetByRefresh use the refresh token for token information data

func (*TokenStore) RemoveByAccess added in v3.3.1

func (ts *TokenStore) RemoveByAccess(access string) (err error)

RemoveByAccess use the access token to delete the token information

func (*TokenStore) RemoveByCode added in v3.4.1

func (ts *TokenStore) RemoveByCode(code string) (err error)

RemoveByCode use the authorization code to delete the token information

func (*TokenStore) RemoveByRefresh added in v3.3.1

func (ts *TokenStore) RemoveByRefresh(refresh string) (err error)

RemoveByRefresh use the refresh token to delete the token information

Jump to

Keyboard shortcuts

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