aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/templates/admin/register-client.html
blob: bfe56f8141d24957b40157f0e624f144b4d2de3f (plain)
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{%extends "base.html"%}

{%block title%}Genenetwork3: Register OAuth2 Client{%endblock%}

{%block pagetitle%}Register OAuth2 Client{%endblock%}

{%block content%}
{{flash_messages()}}

<form method="POST" action="{{url_for('oauth2.admin.register_client')}}">

  <legend>Select client scope</legend>
  <div class="form-group">
    {%for scp in scope%}
    <div class="checkbox">
      <label for="chk-{{scp}}">
        <input name="scope[]" id="chk-{{scp}}"type="checkbox" value="{{scp}}"
	       {%if scp=="profile"%}checked="checked"{%endif%} />
        {{scp}}
      </label>
    </div>
    {%endfor%}
  </div>

  <legend>Basic OAuth2 client information</legend>
  <div class="form-group">
    <label for="txt-client-name" class="form-label">Client name</label>
    <input name="client_name"
           type="text"
           id="txt-client-name"
           class="form-control"
	   required="required" />
  </div>

  <div class="form-group">
    <label for="txt-redirect-uri" class="form-label">Redirect URI</label>
    <input name="redirect_uri"
           type="text"
           id="txt-redirect-uri"
           class="form-control"
	   required="required" />
  </div>

  <div class="form-group">
    <label for="txt-other-redirect-uris" class="form-label">
      Other redirect URIs</label>
    <div class="form-text text-muted">Enter one URI per line</div>
    <textarea name="other_redirect_uris"
              id="txt-other-redirect-uris"
	      cols="80" rows="10"
              class="form-control"
	      title="Enter one URI per line."></textarea>
  </div>

  <div class="form-group">
    <legend>Supported grant types</legend>
    {%for granttype in granttypes%}
    <div class="checkbox">
      <label for="chk-{{granttype.name.lower().replace(' ', '-')}}">
        <input name="grants[]"
	       type="checkbox"
	       value="{{granttype.value}}"
	       id="chk-{{granttype.name.lower().replace(' ', '-')}}"
	       checked="checked" />
        {{granttype.name}}
      </label>
    </div>
    {%endfor%}
  </div>

  <legend>User information</legend>
  <div class="form-group">
    <label for="select-user">The user to register this client for</label>
    <select id="select-user"
            name="user"
            class="form-control"
            required="required">
      {%for user in users%}
      <option value="{{user.user_id}}"
	      {%if user.user_id==current_user.user_id%}
	      selected="selected"
	      {%endif%}>{{user.name}} ({{user.email}})</option>
      {%endfor%}
    </select>
  </div>

  <legend>Other metadata</legend>
  <div class="form-group">
    <label class="form-group" for="txt-client-jwk-uri">
      Client's Public JWKs</label>
    <input type="text"
           id="txt-client-jwk-uri"
           name="client_jwk_uri"
           class="form-control" />
  </div>

  <input type="submit" value="register client" class="btn btn-primary" />
</form>
{%endblock%}