mgostore

package
v0.0.0-...-ee095cc Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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

func (*MongoStorage) SetClient

func (store *MongoStorage) SetClient(id string, client osin.Client) error

SetClient stores a new osin.Client or updates an existing

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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