{"modulePath":"github.com/2lambda123/openshift-origin","version":"v4.1.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package selectprovider\n\n## Constants\n\n```go\nconst SelectProviderTemplateExample = `\u003c!DOCTYPE html\u003e\n\u003c!--\n\nThis template can be modified and used to customize the provider selection page. To replace\nthe provider selection page, set master configuration option oauthConfig.templates.providerSelection to\nthe path of the template file. Don't remove parameters in curly braces below.\n\noauthConfig:\n  templates:\n    providerSelection: templates/select-provider-template.html\n\nThe Name is unique for each provider and can be used for provider specific customizations like\nthe example below.  The Name matches the name of an identity provider in the master configuration.\n--\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eLogin\u003c/title\u003e\n    \u003cstyle type=\"text/css\"\u003e\n      body {\n        font-family: \"Open Sans\", Helvetica, Arial, sans-serif;\n        font-size: 14px;\n        margin: 15px;\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n\n    {{ range $provider := .Providers }}\n      \u003cdiv\u003e\n        \u003c!-- This is an example of customizing display for a particular provider based on its Name --\u003e\n        {{ if eq $provider.Name \"anypassword\" }}\n          \u003ca href=\"{{$provider.URL}}\"\u003eLog in\u003c/a\u003e with any username and password\n        {{ else }}\n          \u003ca href=\"{{$provider.URL}}\"\u003e{{$provider.Name}}\u003c/a\u003e\n        {{ end }}\n      \u003c/div\u003e\n    {{ end }}\n\n  \u003c/body\u003e\n\u003c/html\u003e\n`\n```\nSelectProviderTemplateExample is a basic template for customizing the provider selection page.\n\n## Functions\n\n```go\nfunc NewBootstrapSelectProvider(delegate handlers.AuthenticationSelectionHandler, getter bootstrap.BootstrapUserDataGetter) handlers.AuthenticationSelectionHandler\n```\n\n```go\nfunc NewSelectProvider(render SelectProviderRenderer, forceInterstitial bool) handlers.AuthenticationSelectionHandler\n```\n\n```go\nfunc NewSelectProviderRenderer(customSelectProviderTemplateFile string) (*selectProviderTemplateRenderer, error)\n```\nNewSelectProviderRenderer creates a select provider renderer that takes in an optional custom template to allow branding of the page. Uses the default if customSelectProviderTemplateFile is not set.\n\n```go\nfunc ValidateSelectProviderTemplate(templateContent []byte) []error\n```\n\n## Types\n\n```go\ntype ProviderData struct {\n\tProviders []api.ProviderInfo\n}\n```\n\n```go\ntype SelectProviderRenderer interface {\n\tRender(redirectors []api.ProviderInfo, w http.ResponseWriter, req *http.Request)\n}\n```\n\n","path":"github.com/2lambda123/openshift-origin/pkg/oauthserver/server/selectprovider","name":"selectprovider","synopsis":"","isRedistributable":true}
