Documentation ¶
Overview ¶
Package one client with one more tokens.
Index ¶
- func DefaultFileter() beego.FilterFunc
- func NewAuthFileter(secretFunc tokenauth.GenerateSecretString, ...) beego.FilterFunc
- type O2MAutomatic
- func (a *O2MAutomatic) GetClient(clientID string) (*tokenauth.Audience, error)
- func (a *O2MAutomatic) NewClient(clientName string) (*tokenauth.Audience, error)
- func (a *O2MAutomatic) NewClientToken(client *tokenauth.Audience, w ...http.ResponseWriter) (token *tokenauth.Token, err error)
- func (a *O2MAutomatic) NewClientTokenByClientID(clientID string, w ...http.ResponseWriter) (token *tokenauth.Token, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultFileter ¶
func DefaultFileter() beego.FilterFunc
func NewAuthFileter ¶
func NewAuthFileter(secretFunc tokenauth.GenerateSecretString, tokenFunc tokenauth.GenerateTokenString) 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.
Click to show internal directories.
Click to hide internal directories.