Documentation ¶
Index ¶
- Variables
- func InitDatabase(ctx *models.Context)
- func NewTestHelper(t *testing.T) testhelper.TestHelper
- type AccessData
- type AccessUserData
- type AuthorizeData
- type AuthorizeUserData
- type Refresh
- type Storage
- func (s *Storage) Clone() osin.Storage
- func (s *Storage) Close()
- func (s *Storage) GetClient(id string) (osin.Client, error)
- func (s *Storage) LoadAccess(code string) (*osin.AccessData, error)
- func (s *Storage) LoadAuthorize(code string) (*osin.AuthorizeData, error)
- func (s *Storage) LoadRefresh(code string) (*osin.AccessData, error)
- func (s *Storage) RemoveAccess(code string) error
- func (s *Storage) RemoveAuthorize(code string) error
- func (s *Storage) RemoveRefresh(code string) error
- func (s *Storage) SaveAccess(data *osin.AccessData) error
- func (s *Storage) SaveAuthorize(data *osin.AuthorizeData) error
- func (s *Storage) SetClient(id string, client osin.Client) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAuthorizeDataNotFound = errors.New("AuthorizeData not found") ErrAccessDataNotFound = errors.New("AccessData not found") )
Functions ¶
func InitDatabase ¶
func NewTestHelper ¶
func NewTestHelper(t *testing.T) testhelper.TestHelper
Types ¶
type AccessData ¶
type AccessData struct { Id int AppId int `db:"app_id"` AuthorizeDataId int `db:"authorize_data_id"` AccessDataId int `db:"access_data_id"` AccessToken string `db:"access_token"` RefreshToken string `db:"refresh_token"` ExpiresIn int32 `db:"expires_in"` Scope string RedirectUri string `db:"redirect_uri"` Created string UserId int `db:"user_id"` }
func (AccessData) CreatedTime ¶
func (ad AccessData) CreatedTime() time.Time
type AccessUserData ¶
type AuthorizeData ¶
type AuthorizeData struct { Id int AppId int `db:"app_id"` Code string ExpiresIn int32 `db:"expires_in"` Scope string RedirectUri string `db:"redirect_uri"` State string Created string UserId int `db:"user_id"` }
func (AuthorizeData) CreatedTime ¶
func (ad AuthorizeData) CreatedTime() time.Time
type AuthorizeUserData ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewOAuth2Storage ¶
func (*Storage) LoadAccess ¶
func (s *Storage) LoadAccess(code string) (*osin.AccessData, error)
func (*Storage) LoadAuthorize ¶
func (s *Storage) LoadAuthorize(code string) (*osin.AuthorizeData, error)
func (*Storage) LoadRefresh ¶
func (s *Storage) LoadRefresh(code string) (*osin.AccessData, error)
func (*Storage) RemoveAccess ¶
func (*Storage) RemoveAuthorize ¶
func (*Storage) RemoveRefresh ¶
func (*Storage) SaveAccess ¶
func (s *Storage) SaveAccess(data *osin.AccessData) error
func (*Storage) SaveAuthorize ¶
func (s *Storage) SaveAuthorize(data *osin.AuthorizeData) error
Click to show internal directories.
Click to hide internal directories.