Documentation ¶
Index ¶
- type Test
- func (t *Test) Clone() osin.Storage
- func (t *Test) Close()
- func (t *Test) GetClient(id string) (osin.Client, error)
- func (t *Test) LoadAccess(token string) (*osin.AccessData, error)
- func (t *Test) LoadAuthorize(code string) (*osin.AuthorizeData, error)
- func (t *Test) LoadRefresh(token string) (*osin.AccessData, error)
- func (t *Test) RemoveAccess(token string) error
- func (t *Test) RemoveAuthorize(code string) error
- func (t *Test) RemoveRefresh(token string) error
- func (t *Test) SaveAccess(data *osin.AccessData) error
- func (t *Test) SaveAuthorize(data *osin.AuthorizeData) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Test ¶
type Test struct { Clients map[string]osin.Client AuthorizeData *osin.AuthorizeData Authorize map[string]*osin.AuthorizeData AccessData *osin.AccessData Access map[string]*osin.AccessData Err error }
func (*Test) LoadAccess ¶
func (t *Test) LoadAccess(token string) (*osin.AccessData, error)
LoadAccess retrieves access data by token. Client information MUST be loaded together. AuthorizeData and AccessData DON'T NEED to be loaded if not easily available. Optionally can return error if expired.
func (*Test) LoadAuthorize ¶
func (t *Test) LoadAuthorize(code string) (*osin.AuthorizeData, error)
LoadAuthorize looks up AuthorizeData by a code. Client information MUST be loaded together. Optionally can return error if expired.
func (*Test) LoadRefresh ¶
func (t *Test) LoadRefresh(token string) (*osin.AccessData, error)
LoadRefresh retrieves refresh AccessData. Client information MUST be loaded together. AuthorizeData and AccessData DON'T NEED to be loaded if not easily available. Optionally can return error if expired.
func (*Test) RemoveAccess ¶
RemoveAccess revokes or deletes an AccessData.
func (*Test) RemoveAuthorize ¶
RemoveAuthorize revokes or deletes the authorization code.
func (*Test) RemoveRefresh ¶
RemoveRefresh revokes or deletes refresh AccessData.
func (*Test) SaveAccess ¶
func (t *Test) SaveAccess(data *osin.AccessData) error
SaveAccess writes AccessData. If RefreshToken is not blank, it must save in a way that can be loaded using LoadRefresh.
func (*Test) SaveAuthorize ¶
func (t *Test) SaveAuthorize(data *osin.AuthorizeData) error
SaveAuthorize saves authorize data.