store

package
v3.2.1+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMemoryTokenStore

func NewMemoryTokenStore(gcInterval time.Duration) oauth2.TokenStore

NewMemoryTokenStore Create a token store instance based on memory gcInterval Perform garbage collection intervals(The default is 30 seconds)

func NewTestClientStore

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

NewTestClientStore Create to client information store instance

Types

type MemoryTokenStore

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

MemoryTokenStore Memory storage for token

func (*MemoryTokenStore) Create

func (mts *MemoryTokenStore) Create(info oauth2.TokenInfo) (err error)

Create Create and store the new token information

func (*MemoryTokenStore) GetByAccess

func (mts *MemoryTokenStore) GetByAccess(access string) (ti oauth2.TokenInfo, err error)

GetByAccess Use the access token for token information data

func (*MemoryTokenStore) GetByRefresh

func (mts *MemoryTokenStore) GetByRefresh(refresh string) (ti oauth2.TokenInfo, err error)

GetByRefresh Use the refresh token for token information data

func (*MemoryTokenStore) RemoveByAccess

func (mts *MemoryTokenStore) RemoveByAccess(access string) (err error)

RemoveByAccess Use the access token to delete the token information

func (*MemoryTokenStore) RemoveByRefresh

func (mts *MemoryTokenStore) RemoveByRefresh(refresh string) (err error)

RemoveByRefresh Use the refresh token to delete the token information

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

Jump to

Keyboard shortcuts

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