Documentation
¶
Index ¶
- func CacheDurationOrDefault(d, fallback time.Duration) time.Duration
- func GenerateRandomString(length int) (string, error)
- func StaticCacheControlValue(maxAge time.Duration) string
- func ValidateRequestBody(w http.ResponseWriter, r *http.Request) bool
- func WriteJsonResponse(w http.ResponseWriter, status int, data interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheDurationOrDefault ¶ added in v1.57.0
CacheDurationOrDefault returns d, or fallback if d is non-positive.
func GenerateRandomString ¶
func StaticCacheControlValue ¶ added in v1.57.0
StaticCacheControlValue returns a Cache-Control value appropriate for a static, publicly cacheable document (JWKS, discovery metadata) that changes rarely enough to always require revalidation rather than a shorter max-age.
func ValidateRequestBody ¶
func ValidateRequestBody(w http.ResponseWriter, r *http.Request) bool
func WriteJsonResponse ¶
func WriteJsonResponse(w http.ResponseWriter, status int, data interface{})
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.