Documentation
¶
Index ¶
- type AuthMiddleWare
- func (amw *AuthMiddleWare) Middleware(next http.Handler) http.Handler
- func (amw *AuthMiddleWare) SetAuthBypass(bypassRoutes map[string]bool)
- func (amw *AuthMiddleWare) SetAuthScopes(scopes map[string]string)
- func (amw *AuthMiddleWare) SetOpenIDConfigURL(url string)
- func (amw *AuthMiddleWare) SetValidAudience(audience string)
- type Claims
- type CompressionMiddleware
- type LoggingMiddleware
- type ValidatorMiddleWare
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthMiddleWare ¶
type AuthMiddleWare struct {
// contains filtered or unexported fields
}
AuthMiddleWare is the struct that contains the auth scope
func (*AuthMiddleWare) Middleware ¶
func (amw *AuthMiddleWare) Middleware(next http.Handler) http.Handler
Middleware is the handler that checks validation.
func (*AuthMiddleWare) SetAuthBypass ¶
func (amw *AuthMiddleWare) SetAuthBypass(bypassRoutes map[string]bool)
SetAuthBypass allows the server to specify a bypass on some routes
func (*AuthMiddleWare) SetAuthScopes ¶
func (amw *AuthMiddleWare) SetAuthScopes(scopes map[string]string)
SetAuthScopes sets auth scopes
func (*AuthMiddleWare) SetOpenIDConfigURL ¶
func (amw *AuthMiddleWare) SetOpenIDConfigURL(url string)
SetOpenIDConfigURL sets the endpoint for open id connect
func (*AuthMiddleWare) SetValidAudience ¶ added in v1.2.0
func (amw *AuthMiddleWare) SetValidAudience(audience string)
SetOpenIDConfigURL sets the endpoint for open id connect
type Claims ¶
type Claims struct {
Scp string `json:"scp"`
jwt.StandardClaims
}
Claims is the object model of claims
type CompressionMiddleware ¶
type CompressionMiddleware struct {
}
CompressionMiddleware applies gzip compression to requests
func (*CompressionMiddleware) Middleware ¶
func (cmw *CompressionMiddleware) Middleware(next http.Handler) http.Handler
Middleware is the handler for compression
type LoggingMiddleware ¶
type LoggingMiddleware struct {
// contains filtered or unexported fields
}
LoggingMiddleware applies logging
func (*LoggingMiddleware) Middleware ¶
func (lmw *LoggingMiddleware) Middleware(next http.Handler) http.Handler
Middleware is the handler for logging middleware
func (*LoggingMiddleware) SetOutput ¶
func (lmw *LoggingMiddleware) SetOutput(writer *os.File)
SetOutput accepts an io.writer for log output
type ValidatorMiddleWare ¶
type ValidatorMiddleWare struct {
// contains filtered or unexported fields
}
ValidatorMiddleWare validates the content typs of a request
func (*ValidatorMiddleWare) Middleware ¶
func (vmw *ValidatorMiddleWare) Middleware(next http.Handler) http.Handler
Middleware is the handler for content type validation
func (*ValidatorMiddleWare) SetAcceptedContent ¶
func (vmw *ValidatorMiddleWare) SetAcceptedContent(accepted map[string][]string)
SetAcceptedContent sets the accepted content for a route.
func (*ValidatorMiddleWare) SetValidationBypass ¶
func (vmw *ValidatorMiddleWare) SetValidationBypass(bypassRoutes map[string]bool)
SetValidationBypass sets routes that can be bypassed. For example, healthcheck routes