Documentation ¶
Index ¶
- Constants
- type MongoStorage
- func (store *MongoStorage) Clone() osin.Storage
- func (store *MongoStorage) Close()
- func (store *MongoStorage) GetClient(id string) (osin.Client, error)
- func (store *MongoStorage) LoadAccess(token string) (*osin.AccessData, error)
- func (store *MongoStorage) LoadAccesses(query bson.M) ([]*osin.AccessData, error)
- func (store *MongoStorage) LoadAuthorize(code string) (*osin.AuthorizeData, error)
- func (store *MongoStorage) LoadRefresh(token string) (*osin.AccessData, error)
- func (store *MongoStorage) RemoveAccess(token string) error
- func (store *MongoStorage) RemoveAuthorize(code string) error
- func (store *MongoStorage) RemoveRefresh(token string) error
- func (store *MongoStorage) SaveAccess(data *osin.AccessData) error
- func (store *MongoStorage) SaveAuthorize(data *osin.AuthorizeData) error
- func (store *MongoStorage) SetClient(id string, client osin.Client) error
Constants ¶
View Source
const ( CLIENT_COL = "clients" AUTHORIZE_COL = "authorizations" ACCESS_COL = "accesses" )
collection names for the entities
View Source
const REFRESHTOKEN = "refresh_token"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoStorage ¶
type MongoStorage struct {
// contains filtered or unexported fields
}
func New ¶
func New(session *mgo.Session, dbName string) *MongoStorage
func (*MongoStorage) Clone ¶
func (store *MongoStorage) Clone() osin.Storage
Clone implements the osin.Storage interface
func (*MongoStorage) Close ¶
func (store *MongoStorage) Close()
Close implements the osin.Storage interface
func (*MongoStorage) GetClient ¶
func (store *MongoStorage) GetClient(id string) (osin.Client, error)
GetClient implements the osin.Storage interface
func (*MongoStorage) LoadAccess ¶
func (store *MongoStorage) LoadAccess(token string) (*osin.AccessData, error)
LoadAccess implements the osin.Storage interface
func (*MongoStorage) LoadAccesses ¶
func (store *MongoStorage) LoadAccesses(query bson.M) ([]*osin.AccessData, error)
LoadAccesses returns all accesses that matches given query
func (*MongoStorage) LoadAuthorize ¶
func (store *MongoStorage) LoadAuthorize(code string) (*osin.AuthorizeData, error)
LoadAuthorize implements the osin.Storage interface
func (*MongoStorage) LoadRefresh ¶
func (store *MongoStorage) LoadRefresh(token string) (*osin.AccessData, error)
LoadRefresh implements the osin.Storage interface
func (*MongoStorage) RemoveAccess ¶
func (store *MongoStorage) RemoveAccess(token string) error
RemoveAccess implements the osin.Storage interface
func (*MongoStorage) RemoveAuthorize ¶
func (store *MongoStorage) RemoveAuthorize(code string) error
RemoveAuthorize implements the osin.Storage interface
func (*MongoStorage) RemoveRefresh ¶
func (store *MongoStorage) RemoveRefresh(token string) error
RemoveRefresh implements the osin.Storage interface
func (*MongoStorage) SaveAccess ¶
func (store *MongoStorage) SaveAccess(data *osin.AccessData) error
SaveAccess implements the osin.Storage interface
func (*MongoStorage) SaveAuthorize ¶
func (store *MongoStorage) SaveAuthorize(data *osin.AuthorizeData) error
SaveAuthorize implements the osin.Storage interface
Click to show internal directories.
Click to hide internal directories.