auth
auth/authd/templates/simple.gotmpl
Init Config, add profile handlers, and add grant template. Call config.Init() before attempting to use it. Register our profile handlers with the router. Define a simple get_grant template for the authorization grant endpoint.
1.1 --- a/authd/templates/simple.gotmpl Sun Dec 14 17:02:23 2014 -0500 1.2 +++ b/authd/templates/simple.gotmpl Sun Dec 14 17:03:33 2014 -0500 1.3 @@ -15,3 +15,16 @@ 1.4 </form> 1.5 </body> 1.6 </html>{{ end }} 1.7 + 1.8 +{{ define "get_grant" }}<html> 1.9 + <head> 1.10 + <title>Grant access</title> 1.11 + </head> 1.12 + <body>{{ if .error }} 1.13 + <h1>Error</h1> 1.14 + <p>{{ .error }}</p>{{ end }}{{ if .internal_error }} 1.15 + <h1>Error</h1> 1.16 + <p>{{ .internal_error }}</p>{{ end }}{{ if not .error }}{{ if not .internal_error }}<h1>Grant access</h1> 1.17 + <p>{{ .client }} is requesting access to your account. if you grant it, you'll be redirected to {{ .redirectURL }}. Their access will be limited to {{ .scope }}. You are granting access for {{ .profile }}.</p>{{ end }}{{ end }} 1.18 + </body> 1.19 +</html>{{ end }}