store

package
v3.4.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2016 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileTokenStore

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

func NewTestClientStore

func NewTestClientStore(clients ...*models.Client) oauth2.ClientStore

NewTestClientStore Create to client information store instance

Types

type TestClientStore

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

TestClientStore Client information store

func (*TestClientStore) GetByID

func (ts *TestClientStore) GetByID(id string) (cli oauth2.ClientInfo, err error)

GetByID According to the ID for the client information

type TokenStore

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

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

func (*TokenStore) Create

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

Create Create and store the new token information

func (*TokenStore) GetByAccess

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

GetByAccess Use the access token for token information data

func (*TokenStore) GetByCode

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

GetByCode Use the authorization code for token information data

func (*TokenStore) GetByRefresh

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

GetByRefresh Use the refresh token for token information data

func (*TokenStore) RemoveByAccess

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

RemoveByAccess Use the access token to delete the token information

func (*TokenStore) RemoveByCode

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

RemoveByCode Use the authorization code to delete the token information

func (*TokenStore) RemoveByRefresh

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