1
2
3
4
5
6
7
8
9
10
11
12
13
|
{{define "content"}}
<div class="panel"><h3>Personal access tokens</h3>
<p>Use a token as the password when pushing over HTTPS, or send it as <code>Authorization: Bearer</code> to the <a href="/api">API</a>. Tokens are shown once and stored hashed.</p>
{{with .Data.NewToken}}<p class="notice">New token, shown once: <code>{{.}}</code></p>{{end}}
{{if .Data.Tokens}}<table class="keys">{{range .Data.Tokens}}<tr><td>{{.Title}}</td><td><span class="tag">{{.Scope}}</span></td><td class="when">created {{ago .Created}}</td><td class="when">{{if .Used.IsZero}}never used{{else}}used {{ago .Used}}{{end}}</td><td><form method="post" action="/settings/tokens/{{.ID}}/delete"><button class="btn danger">Revoke</button></form></td></tr>{{end}}</table>{{else}}<p>You have not created any personal access tokens.</p>{{end}}
<form method="post" action="/settings/tokens" class="stack">
<label>Title <input name="title" placeholder="ci" maxlength="100"></label>
<label class="radio"><input type="radio" name="scope" value="all" checked> All<small>Push, pull and every API call your account may make</small></label>
<label class="radio"><input type="radio" name="scope" value="read"> Read<small>Clone, fetch and read the API, nothing that changes state</small></label>
<label class="radio"><input type="radio" name="scope" value="gist"> Gist<small>Read everything and create, edit or push to your gists only</small></label>
<div class="actions left"><button class="btn primary">Generate new token ▸</button></div>
</form></div>
{{end}}
|