~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/templates/oauth-personal-token.html -rw-r--r-- 1.7 KiB
72548bd7Drew DeVault API: Updates per core-go auth changes 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{% extends "meta.html" %}
{% block title %}
<title>Personal access token - {{cfg("sr.ht", "site-name")}} meta</title>
{% endblock %}
{% block content %}
<div class="row">
  <form class="col-md-12" method="POST" action="/oauth/personal-token">
    {{csrf_token()}}
    <h3>Personal Access Token</h3>
    {% if token %}
    <dl>
      <dt>Personal Access Token</dt>
      <dd>{{token}}</dt>
    </dl>
    <p>
      Your access token <strong>will never be shown to you again</strong>. Keep
      this secret.
    </p>
    <a href="/oauth" class="btn btn-primary">Continue {{icon('caret-right')}}</a>
    {% else %}
    <p>
      This will generate a valid OAuth token with complete access to your
      {{cfg("sr.ht", "site-name")}} account, all {{cfg("sr.ht", "site-name")}}
      services, and all third party accounts that use
      {{cfg("sr.ht", "site-name")}} for authentication.
      It will expire in one year, or when you manually revoke it.
    </p>
    <div class="form-group">
      <label for="comment">Comment</label>
      <input
        type="text"
        class="form-control {{valid.cls("comment")}}"
        id="comment"
        name="comment"
        value="{{comment or ""}}"
        aria-describedby="comment-help" />
      <small id="comment-help" class="text-muted">
        Arbitrary comment for personal reference only
      </small>
      {{valid.summary("comment")}}
    </div>
    <button
      type="submit"
      name="accept"
      class="btn btn-danger"
    >Proceed and generate token {{icon('caret-right')}}</button>
    <a
      class="btn btn-default" href="/oauth"
    >Nevermind {{icon('caret-right')}}</a>
    {% endif %}
  </form>
</div>
{% endblock %}