diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/change_ssh.html | 32 | ||||
-rw-r--r-- | templates/changepw.html | 28 | ||||
-rw-r--r-- | templates/index.html | 46 | ||||
-rw-r--r-- | templates/layout/base.html | 40 |
4 files changed, 146 insertions, 0 deletions
diff --git a/templates/change_ssh.html b/templates/change_ssh.html new file mode 100644 index 0000000..96231a7 --- /dev/null +++ b/templates/change_ssh.html @@ -0,0 +1,32 @@ + +{{ define "content" }} +<div class="column"> + <h2>Your existing SSH keys</h2> + <ul class="unstyled"> + {{ $csrf := .CsrfField }} + {{ range .SSHKeys }} + <li class="sshkey"> + <form method="post" action=""> + <span class="sshfingerprint">{{ .Fingerprint }} {{ .Comment }}</span> + {{ $csrf }} + <input type="hidden" name="sshkey" value="{{ . }}"> + <input type="submit" name="delete" value="❌" class="btn-delete"> + </form> + <label for="show_full_{{.KeyEnd}}" class="keyend" title="Click for full key">Key ends in: {{ .KeyEnd }}</label> + <input id="show_full_{{.KeyEnd}}" type="radio" name="showfull" value="full" class="hidden"> + <label class="fullkey">{{ . }} <input type="radio" name="showfull" value="end" class="hidden"></label> + </li> + {{ end }} + </ul> +</div> +<form method="post" autocomplete="off" class="column"> + {{ $csrf }} + <p>Paste your SSH public keys (one key per line):</p> + <textarea name="ssh_keys"></textarea> + <input name="add_key" type="submit" class="form-element form-button" /> +</form> + +<div class="column full"> + <a href=".">Back</a> +</div> +{{ end }} diff --git a/templates/changepw.html b/templates/changepw.html new file mode 100644 index 0000000..a7c1dc6 --- /dev/null +++ b/templates/changepw.html @@ -0,0 +1,28 @@ +{{ define "title" }}Change {{.Pwtype}} password{{ end }} + +{{ define "content" }} +<form method="post" autocomplete="off" class="column"> + <h2>Change {{ .Pwtype }} password</h2> + <p>When thinking of a new password you need to remember to use:</p> + <ul class="indented"> + <li>no fewer than ten characters</li> + <li>at least one upper case and one lower case letter</li> + <li>three or more numbers or special characters i.e. <pre>,.][!@#$%^&*?_()-</pre></li> + </ul> + <br> + {{ .CsrfField }} + <label class="form-element-wrapper">New password + <input type="password" name="new_password" class="form-element form-field" /> + </label> + <label class="form-element-wrapper">Repeat password + <input type="password" name="new_password_again" class="form-element form-field" /> + </label> + <div class="form-element-wrapper"> + <input type="submit" value="Change password" class="form-element form-button" /> + </div> +</form> + + <div class="column full"> + <a href=".">Back</a> + </div> +{{ end }} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..218ffe2 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,46 @@ +{{ define "content" }} +<div class="column"> +<h2>SSO Password Manager</h2> +{{with .User}} + <p> + Hello {{.DisplayName}},<br> + Welcome to the single sign on password manager site. + </p> + <h3>Your usernames</h3> + <dl class="flex-container"> + <dt>SSO:</dt> + <dd>{{ .UserName }}</dd> + <dt>eduroam:</dt> + <dd>{{ .UserName }}/ppp@NORDU.NET</dd> + </dl> + + <h3>Available actions</h3> + <ul class="unstyled"> + <li> + <a href="sso"><span class="item-marker">›</span> Change single sign on (SSO) password</a> + </li> + {{ if .Staff }} + <li> + <a href="tacacs"><span class="item-marker">›</span> Change TACACS password</a> + </li> + {{ end }} + {{ if .Active }} + <li> + <a href="eduroam"><span class="item-marker">›</span> Change eduroam password</a> + </li> + {{ end }} + {{ if .Staff }} + <li> + <a href="pubkeys"><span class="item-marker">›</span> Update your public SSH keys</a> + </li> + <li> + <a href="ideviceconf" rel="external"><span class="item-marker">›</span> Configure eduroam on your iDevice</a> + </li> + {{ end }} + </ul> + <p> + <a href="/Shibboleth.sso/Logout">Log out</a> + </p> +{{ end }} +</div> +{{ end }} diff --git a/templates/layout/base.html b/templates/layout/base.html new file mode 100644 index 0000000..f041321 --- /dev/null +++ b/templates/layout/base.html @@ -0,0 +1,40 @@ +{{define "base"}} +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width,initial-scale=1.0"> + <title>{{block "title" .}}SSO Password Manager{{end}}</title> + <link rel="stylesheet" type="text/css" href="static/css/main.css"> + <link href="static/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon"> + </head> + <body> + <div class="wrapper"> + <header> + <div class="container"> + <img src="static/images/nordunet.png" alt="NORDUnet Nordic Gateway for Research and Education"> + </div> + </header> + <div class="container flex-group"> + <nav> + </nav> + <div class="content flex-container"> + {{if .Flash }} + <div class="column full "> + <div class="alert alert-{{ .FlashClass }}"> + {{ .Flash }} + </div> + </div> + {{ end }} + {{block "content" .}} {{ end }} + </div> + </div> + <footer> + <div class="container container-footer"> + <p class="footer-text">NORDUnet A/S | Kastruplundgade 22 | DK-2770 Kastrup | DENMARK | Phone +45 32 46 25 00 | Fax +45 45 76 23 66 | info@nordu.net</p> + </div> + </footer> + </div> + </body> +</html> +{{end}} |