From b743ed30b5318dcd0ea0c526fce465cdd2fa73fc Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 26 Jan 2019 07:32:58 -0800 Subject: idp: scare people away --- idp/main.go | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/idp/main.go b/idp/main.go index c0ba552..ed19620 100644 --- a/idp/main.go +++ b/idp/main.go @@ -39,6 +39,10 @@ func main() { log.Println(i.t.ProvisioningUri(*domain, *domain)) + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "text/html") + w.Write([]byte(rootPageTemplate)) + }) http.HandleFunc("/auth", i.auth) http.HandleFunc("/challenge", i.challenge) http.ListenAndServe(":"+*port, ex.HTTPLog(http.DefaultServeMux)) @@ -182,6 +186,31 @@ func (i *idp) challenge(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, u.String(), http.StatusTemporaryRedirect) } +const rootPageTemplate = ` + + +Auth + + + + +
+
+
+

Error

+
+ +

This is a private identity provider supporting IndieAuth for the use of Christine Dodrill only. Unauthorized access is forbidden.

+
+
+ +` + const authPageTemplate = ` @@ -202,7 +231,7 @@ const authPageTemplate = `

Code:
-

+

-- cgit v1.2.3