auth
2015-06-29
Parent:de5e09680f6b
auth/authd/templates/simple.gotmpl
Add kubernetes definitions. Define a replication controller that will spin up authd servers (using Ducky right now--other instances should rename the ducky parts appropriately). Also, my understanding of which labels go where may be shaky, which is probably evidenced by the fact that all of these things share the same lables. _Whatever_. It also hooks the generated pods up to the JWT secret volume, so they can properly read the JWT secret. Also, created a LoadBalancer Service that will route traffic to the pods created by the Replication Controller.
1 {{ define "login" }}<html>
2 <head>
3 <title>Log in</title>
4 </head>
5 <body>
6 <h1>Please log into your account</h1>{{ if .errors }}
7 <h2>Errors:</h2>
8 <ul>{{ range .errors }}
9 <li>{{ . }}</li>
10 </ul>{{ end }}{{ end }}
11 <form method="POST">
12 <p>Username: <input type="text" name="login"></p>
13 <p>Password: <input type="password" name="passphrase"></p>
14 <p><input type="submit"></p>
15 </form>
16 </body>
17 </html>{{ end }}
19 {{ define "get_grant" }}<html>
20 <head>
21 <title>Grant access</title>
22 </head>
23 <body>{{ if .error }}
24 <h1>Error</h1>
25 <p>{{ .error }}</p>{{ end }}{{ if .internal_error }}
26 <h1>Error</h1>
27 <p>{{ .internal_error }}</p>{{ end }}{{ if not .error }}{{ if not .internal_error }}<h1>Grant access</h1>
28 <p>{{ .client.Name }} is requesting access to your account. if you grant it, you'll be redirected to {{ .redirectURL }}.{{ if .scopes }} Their access will be limited to:</p>
29 <ul>{{ range .scopes }}
30 <li>{{ .Name }}{{ if .Description }}: {{ .Description }}{{ end }}</li>{{ end }}
31 </ul>{{ end }}
32 <p>You are granting access for {{ .profile.Name }}.</p>{{ end }}{{ end }}
33 <form method="POST">
34 <input type="submit" name="grant" value="approved">
35 <input type="hidden" name="csrftoken" value="{{ .csrftoken }}">
36 </form>
37 </body>
38 </html>{{ end }}