redirector

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2015 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// URLToken in the query of the redirectURL gets replaced with the original request URL, escaped as a query parameter.
	// Example use: https://www.example.com/login?then=${url}
	URLToken = "${url}"

	// QueryToken in the query of the redirectURL gets replaced with the original request URL, unescaped.
	// Example use: https://www.example.com/sso/oauth/authorize?${query}
	QueryToken = "${query}"
)

Variables

This section is empty.

Functions

func NewChallenger

func NewChallenger(baseRequestURL *url.URL, redirectURL string) oauthhandlers.AuthenticationChallenger

NewChallenger returns an oauthhandlers.AuthenticationChallenger that returns a Location header to the specified redirectURL. Request URLs missing scheme/host, or with relative paths are resolved relative to the baseRequestURL, if specified. The following tokens are replaceable in the query of the redirectURL:

${url} is replaced with the current request URL, escaped as a query parameter. Example: https://www.example.com/login?then=${url}
${query} is replaced with the current request query, unescaped. Example: https://www.example.com/sso/oauth/authorize?${query}

func NewRedirector

func NewRedirector(baseRequestURL *url.URL, redirectURL string) oauthhandlers.AuthenticationRedirector

NewRedirector returns an oauthhandlers.AuthenticationRedirector that redirects to the specified redirectURL. Request URLs missing scheme/host, or with relative paths are resolved relative to the baseRequestURL, if specified. The following tokens are replaceable in the query of the redirectURL:

${url} is replaced with the current request URL, escaped as a query parameter. Example: https://www.example.com/login?then=${url}
${query} is replaced with the current request query, unescaped. Example: https://www.example.com/sso/oauth/authorize?${query}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL