~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/templates/oauth2-register-client.html -rw-r--r-- 2.6 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{% extends "meta.html" %}
{% block title %}
<title>Register OAuth 2.0 client - {{cfg("sr.ht", "site-name")}} meta</title>
{% endblock %}
{% block content %}
<div class="row">
  <div class="col-md-12">
    <h3>Register OAuth 2.0 client</h3>
  </div>
</div>
<div class="row">
  <form class="col-md-10 offset-md-1" method="POST">
    {{csrf_token()}}
    <p>
      {{cfg('sr.ht', 'site-name')}} provides API access via
      <a
        href="https://tools.ietf.org/html/rfc6749"
        rel="noopener"
      >RFC 6749</a>-compatible OAuth 2.0 confidential clients.
    </p>
    <div class="form-group">
      <label for="client_name">Client name</label>
      <input
        type="text"
        id="client_name"
        name="client_name"
        class="form-control {{valid.cls("client_name")}}"
        value="{{client_name or ""}}"
        required />
      {{valid.summary("client_name")}}
    </div>
    <div class="form-group">
      <label for="client_name">Description</label>
      <input
        type="text"
        id="client_description"
        name="client_description"
        class="form-control {{valid.cls("client_description")}}"
        value="{{client_description or ""}}" />
      {{valid.summary("client_description")}}
    </div>
    <div class="form-group">
      <label for="client_url">Informative URL</label>
      <input
        type="text"
        id="client_url"
        name="client_url"
        class="form-control {{valid.cls("client_url")}}"
        aria-describedBy="client_url-help"
        value="{{client_url or ""}}" />
      <small id="client_url-help" class="text-muted">
        Where can the user go to learn more about your client?
      </small>
      {{valid.summary("client_url")}}
    </div>
    <div class="form-group">
      <label for="redirect_uri">Redirection URI</label>
      <input
        type="text"
        id="redirect_uri"
        name="redirect_uri"
        class="form-control {{valid.cls("redirect_uri")}}"
        aria-describedBy="redirect_uri-help"
        value="{{redirect_uri or ""}}"
        required />
      <small id="redirect_uri-help" class="text-muted">
        Where should we send the user after they consent to give you API access?
        See <a
          href="https://tools.ietf.org/html/rfc6749#section-3.1.2"
          rel="noopener"
        >RFC 6749 section 3.1.2</a>.
      </small>
      {{valid.summary("redirect_uri")}}
    </div>
    <button type="submit" class="btn btn-primary">
      Register client {{icon('caret-right')}}
    </button>
    <a href="{{url_for('oauth2.dashboard')}}" class="btn btn-default">
      Cancel {{icon('caret-right')}}
    </a>
  </form>
</div>
{% endblock %}