redirector

package
v4.0.0-alpha.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: Apache-2.0 Imports: 5 Imported by: 19

Documentation

Index

Constants

This section is empty.

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