Documentation ¶
Index ¶
- type Express
- func (es *Express) AuthorizeRequests(handle httprouter.Handle) httprouter.Handle
- func (es *Express) CanAccess(r *http.Request, router httprouter.Params) bool
- func (es *Express) GetAppId(router httprouter.Params) string
- func (es *Express) GetAuthKey(r *http.Request) string
- func (es *Express) Route() *httprouter.Router
- func (es *Express) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (es *Express) UnauthorizedResponse(w http.ResponseWriter, r *http.Request)
- func (es *Express) Use(middlewares ...Next)
- type Next
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Express ¶
func (*Express) AuthorizeRequests ¶
func (es *Express) AuthorizeRequests(handle httprouter.Handle) httprouter.Handle
Attach global protection to HTTP routes, to verify the API key.
func (*Express) GetAppId ¶
func (es *Express) GetAppId(router httprouter.Params) string
Get the appId from the URL
func (*Express) GetAuthKey ¶
Get the api token from the r.
func (*Express) Route ¶
func (es *Express) Route() *httprouter.Router
func (*Express) UnauthorizedResponse ¶
func (es *Express) UnauthorizedResponse(w http.ResponseWriter, r *http.Request)
Handle unauthorized rs.
Click to show internal directories.
Click to hide internal directories.