git.iko.soy/typeable/oauth2-proxy
on master help sign in
template updates to display version
a49eadaJehiah Czebotar
oauthproxy.go+2
@@ -229,10 +229,12 @@ func (p *OauthProxy) SignInPage(rw http.ResponseWriter, req *http.Request, code
229 SignInMessage string
229 SignInMessage string
230 Htpasswd bool
230 Htpasswd bool
231 Redirect string
231 Redirect string
232+ Version string
232 }{
233 }{
233 SignInMessage: p.SignInMessage,
234 SignInMessage: p.SignInMessage,
234 Htpasswd: p.HtpasswdFile != nil,
235 Htpasswd: p.HtpasswdFile != nil,
235 Redirect: req.URL.RequestURI(),
236 Redirect: req.URL.RequestURI(),
237+ Version: VERSION,
236 }
238 }
237 templates.ExecuteTemplate(rw, "sign_in.html", t)
239 templates.ExecuteTemplate(rw, "sign_in.html", t)
238}
240}
templates.go+20
@@ -76,6 +76,23 @@ func getTemplates() *template.Template {
76 margin:0;
76 margin:0;
77 box-sizing: border-box;
77 box-sizing: border-box;
78 }
78 }
79+ footer {
80+ display:block;
81+ font-size:10px;
82+ color:#aaa;
83+ text-align:center;
84+ margin-bottom:10px;
85+ }
86+ footer a {
87+ display:inline-block;
88+ height:25px;
89+ line-height:25px;
90+ color:#aaa;
91+ text-decoration:underline;
92+ }
93+ footer a:hover {
94+ color:#aaa;
95+ }
79 </style>
96 </style>
80</head>
97</head>
81<body>
98<body>
@@ -99,6 +116,9 @@ func getTemplates() *template.Template {
99 </form>
116 </form>
100 </div>
117 </div>
101 {{ end }}
118 {{ end }}
119+ <footer>
120+ Secured with <a href="https://github.com/bitly/google_auth_proxy#google_auth_proxy">Google Auth Proxy</a> version {{.Version}}
121+ </footer>
102</body>
122</body>
103</html>
123</html>
104{{end}}`)
124{{end}}`)