o2m

package
Version: v0.0.0-...-bc71274 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package one client with one more tokens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFileter

func DefaultFileter() beego.FilterFunc

Types

type O2MAutomatic

type O2MAutomatic struct {
	tokenauth2beego.Automatic
}
var Auth *O2MAutomatic

func (*O2MAutomatic) GetClient

func (a *O2MAutomatic) GetClient(clientID string) (*tokenauth.Audience, error)

Get client info from store by clientID. Returns exist client info or error.

func (*O2MAutomatic) NewClient

func (a *O2MAutomatic) NewClient(clientName string) (*tokenauth.Audience, error)

Get a new Clinet Info. ClientName just client description info. You need save client info for get client info from store once again.

func (*O2MAutomatic) NewClientToken

func (a *O2MAutomatic) NewClientToken(client *tokenauth.Audience, w ...http.ResponseWriter) (token *tokenauth.Token, err error)

Get and Save a new client token. Set Authorization to header,if w is not nil.

func (*O2MAutomatic) NewClientTokenByClientID

func (a *O2MAutomatic) NewClientTokenByClientID(clientID string, w ...http.ResponseWriter) (token *tokenauth.Token, err error)

Get and Save a new client token. Set Authorization to header,if w is not nil.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL