models

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MgoAccessData

type MgoAccessData struct {
	Client        MgoClient         `bson:"client"`
	AuthorizeData *MgoAuthorizeData `bson:"authorize_data"`
	AccessData    *MgoAccessData    `bson:"previous_access_data"`
	AccessToken   string            `bson:"access_token"`
	RefreshToken  string            `bson:"refresh_token"`
	ExpiresIn     int32             `bson:"expires_in"`
	Scope         string            `bson:"scope"`
	RedirectURI   string            `bson:"redirect_uri"`
	CreatedAt     time.Time         `bson:"created_at"`
	UserData      interface{}       `bson:"user_data"`
}

MgoAccessData represents a bson struct of osin.AccessData

func NewMgoAccessData

func NewMgoAccessData(data *osin.AccessData) *MgoAccessData

NewMgoAccessData creates a new MgoAccessData with properties from osin.AccessData

func (*MgoAccessData) MapToOsinAccessData

func (a *MgoAccessData) MapToOsinAccessData() *osin.AccessData

MapToOsinAccessData creates a new osin.AccessData with properties from MgoAccessData

type MgoAuthorizeData

type MgoAuthorizeData struct {
	Client      MgoClient   `bson:"client"`
	Code        string      `bson:"code"`
	ExpiresIn   int32       `bson:"expires_in"`
	Scope       string      `bson:"scope"`
	RedirectURI string      `bson:"redirect_uri"`
	State       string      `bson:"state"`
	CreatedAt   time.Time   `bson:"created_at"`
	UserData    interface{} `bson:"user_data"`
}

MgoAuthorizeData represents a bson struct of osin.AuthorizeData

func NewMgoAuthorizeData

func NewMgoAuthorizeData(data *osin.AuthorizeData) *MgoAuthorizeData

NewMgoAuthorizeData creates a new MgoAuthorizeData with properties from osin.AuthorizeData

func (*MgoAuthorizeData) MapToOsinAuthorizeData

func (a *MgoAuthorizeData) MapToOsinAuthorizeData() *osin.AuthorizeData

MapToOsinAuthorizeData creates a new osin.AuthorizeData with properties from MgoAuthorizeData

type MgoClient

type MgoClient struct {
	ID          string      `bson:"_id"`
	RedirectURI string      `bson:"redirect_uri"`
	Secret      string      `bson:"secret"`
	UserData    interface{} `bson:"user_data"`
}

MgoClient represents a bson struct of osin.DefaultClient

func NewMgoClient

func NewMgoClient(client osin.Client) *MgoClient

NewMgoClient creates a new MgoClient with properties from osin.Client

func (*MgoClient) MapToOsinClient

func (c *MgoClient) MapToOsinClient() osin.Client

MapToOsinClient creates a new osin.Client with properties from MgoClient

Jump to

Keyboard shortcuts

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