package authcode
import (
"fmt"
"net/url"
)
// BrowserSuccessHTML is the success page on browser based authentication.
const BrowserSuccessHTML = `
Authenticated
Authenticated
You have logged in to the cluster. You can close this window.
`
func BrowserRedirectHTML(target string) string {
targetURL, err := url.Parse(target)
if err != nil {
return fmt.Sprintf(`invalid URL is set: %s`, err)
}
return fmt.Sprintf(`
Authenticated
redirecting...
`, targetURL, targetURL)
}