Documentation
¶
Index ¶
- func AdminApiHandler(rw http.ResponseWriter, r *http.Request)
- func HandleCacheControl(next http.Handler) http.Handler
- func NotFoundHandler(rw http.ResponseWriter, req *http.Request)
- func ProtectedApiHandler(rw http.ResponseWriter, r *http.Request)
- func PublicApiHandler(rw http.ResponseWriter, r *http.Request)
- func ServerError(rw http.ResponseWriter, err error)
- func ValidateJWT(audience, domain string, next http.Handler) http.Handler
- func ValidatePermissions(expectedClaims []string, next http.Handler) http.Handler
- type CustomClaims
- type ErrorMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminApiHandler ¶
func AdminApiHandler(rw http.ResponseWriter, r *http.Request)
func NotFoundHandler ¶
func NotFoundHandler(rw http.ResponseWriter, req *http.Request)
func ProtectedApiHandler ¶
func ProtectedApiHandler(rw http.ResponseWriter, r *http.Request)
func PublicApiHandler ¶
func PublicApiHandler(rw http.ResponseWriter, r *http.Request)
func ServerError ¶
func ServerError(rw http.ResponseWriter, err error)
Types ¶
type CustomClaims ¶
type CustomClaims struct {
Permissions []string `json:"permissions"`
}
func (CustomClaims) HasPermissions ¶
func (c CustomClaims) HasPermissions(expectedClaims []string) bool
type ErrorMessage ¶
type ErrorMessage struct {
Message string `json:"message"`
}
Click to show internal directories.
Click to hide internal directories.