Documentation ¶
Index ¶
Constants ¶
View Source
const InvalidTokenMessage = "Invalid API Token"
InvalidTokenMessage is the message set when an invalid / missing token is found.
View Source
const TokenPathParam = "token"
TokenPathParam is the name of the path parameter used by URLAuthPrefix
View Source
const URLAuthPrefix = "/urlAuth/:" + TokenPathParam
URLAuthPrefix is the echo formatted url/path param which can be used for supplying an API token.
Variables ¶
This section is empty.
Functions ¶
func MakeCORS ¶
func MakeCORS(tokenHeader string) echo.MiddlewareFunc
MakeCORS sets up CORS with a token header.
func MakeLogger ¶
MakeLogger initializes the logger middleware function
Types ¶
type AuthMiddleware ¶
type AuthMiddleware struct {
// contains filtered or unexported fields
}
AuthMiddleware provides some data to the handler.
type LoggerMiddleware ¶
type LoggerMiddleware struct {
// contains filtered or unexported fields
}
LoggerMiddleware provides some extra state to the logger middleware
Click to show internal directories.
Click to hide internal directories.