Documentation
¶
Index ¶
- Constants
- func AudienceForPath(path string) token.Audience
- func AudienceFromRequest(r *http.Request) (token.Audience, error)
- func IsSafeReturnTo(v string) bool
- func NormalizeReturnTo(v string) (string, bool)
- func QueryParam(r *http.Request) string
- func Redirect(w http.ResponseWriter, r *http.Request, location string, status int)
- func WithReturnTo(path string, returnTo string) string
Constants ¶
View Source
const ReturnToQueryParam = "return_to"
Variables ¶
This section is empty.
Functions ¶
func AudienceForPath ¶
func IsSafeReturnTo ¶
IsSafeReturnTo reports whether the provided value is a safe relative redirect path.
func NormalizeReturnTo ¶
NormalizeReturnTo validates the value and returns the normalized redirect target. If the value is invalid it returns ("", false).
func QueryParam ¶
QueryParam returns the raw return_to query parameter value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.