auther

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendOperateEvent

func SendOperateEvent(req, resp interface{}, hd *event.Header, od *event.OperateEventData) error

Types

type HTTPAuther

type HTTPAuther struct {
	// contains filtered or unexported fields
}

internal todo

func NewHTTPAuther

func NewHTTPAuther() *HTTPAuther

NewInternalAuther 内部使用的auther

func (*HTTPAuther) Auth

func (a *HTTPAuther) Auth(r *http.Request, entry httpb.Entry) (
	authInfo interface{}, err error)

func (*HTTPAuther) ResponseHook

func (a *HTTPAuther) ResponseHook(w http.ResponseWriter, r *http.Request, entry httpb.Entry)

func (*HTTPAuther) SetLogger

func (a *HTTPAuther) SetLogger(l logger.Logger)

SetLogger todo

func (*HTTPAuther) ValidateIdentity

func (a *HTTPAuther) ValidateIdentity(ctx context.Context, accessToken string) (*token.Token, error)

func (*HTTPAuther) ValidatePermission

func (a *HTTPAuther) ValidatePermission(ctx context.Context, tk *token.Token, e httpb.Entry) error

Jump to

Keyboard shortcuts

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