Documentation
¶
Overview ¶
Package mw contains middlewares.
Index ¶
Constants ¶
View Source
const VerificationTokenHeader = "Verification-Token"
VerificationTokenHeader defines a verification token name that should be passed in request headers.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth defines an authorization middleware of the Database Lab HTTP server.
func NewAuth ¶
func NewAuth(verificationToken string, personalTokenVerifier platform.PersonalTokenVerifier) *Auth
NewAuth creates a new Auth middleware.
func (*Auth) Authorized ¶
func (a *Auth) Authorized(h http.HandlerFunc) http.HandlerFunc
Authorized checks if the user has permission to access.
Click to show internal directories.
Click to hide internal directories.