store

package
v3.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: MIT Imports: 8 Imported by: 99

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileTokenStore added in v3.3.1

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

NewFileTokenStore create a token store instance based on file

func NewMemoryTokenStore

func NewMemoryTokenStore() (oauth2.TokenStore, 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) (oauth2.ClientInfo, 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) error

Create create and store the new token information

func (*TokenStore) GetByAccess added in v3.3.1

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

GetByAccess use the access token for token information data

func (*TokenStore) GetByCode added in v3.4.1

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

GetByCode use the authorization code for token information data

func (*TokenStore) GetByRefresh added in v3.3.1

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

GetByRefresh use the refresh token for token information data

func (*TokenStore) RemoveByAccess added in v3.3.1

func (ts *TokenStore) RemoveByAccess(access string) 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) 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) 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