Documentation ¶
Index ¶
Constants ¶
View Source
const AuthName = "oauth2"
AuthName is the auth style
View Source
const Random = "random"
Random is a state value
Variables ¶
View Source
var ( ErrInvalidState = errors.New("invalid state") ErrInvalidCode = errors.New("invalid code") ErrInvalidToken = errors.New("invalid authorization") ErrInvalidAuth = errors.New("invalid authentication") ErrExpiredToken = errors.New("expired token") )
errors
Functions ¶
func Use ¶
func Use(middleware *OAuth2)
Use put a custom oauth2 logic then register handler to chassis
func WriteBackErr ¶
func WriteBackErr(err error, status int, cb invocation.ResponseCallBack)
WriteBackErr write err and callback
Types ¶
type Handler ¶
type Handler struct { }
Handler is is a oauth2 pre process raw data in handler
func (*Handler) Handle ¶
func (oa *Handler) Handle(chain *handler.Chain, inv *invocation.Invocation, cb invocation.ResponseCallBack)
Handle is provider
Click to show internal directories.
Click to hide internal directories.