aboutsummaryrefslogtreecommitdiff
path: root/gn3/templates/admin/register-client.html
blob: 3058aeec6a765a019529703c7520e1c585b2bef6 (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
{%extends "base.html"%}

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

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

<h1>Genenetwork3: Register OAuth2 Client</h1>

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

  <fieldset>
    <legend>Select client scope</legend>

    {%for scp in scope%}
    <input name="scope[]" id="chk:{{scp}}"type="checkbox" value="{{scp}}"
	   {%if scp=="profile"%}checked="checked"{%endif%} />
    <label for="chk:{{scp}}">{{scp}}</label><br />
    {%endfor%}

  </fieldset>

  <fieldset>
    <legend>Basic OAuth2 client information</legend>

    
    <label for="txt:client-name">Client name</label>
    <input name="client_name" type="text" id="txt:client-name"
	   required="required" />
    <br /><br />

    <label for="txt:redirect-uri">Redirect URI</label>
    <input name="redirect_uri" type="text" id="txt:redirect-uri"
	   required="required" />
    <br /><br />

    <label for="txt:other-redirect-uris">
      Other redirect URIs (Enter one URI per line)</label>
    <br />
    <textarea name="other_redirect_uris" id="txt:other-redirect-uris"
	      cols="80" rows="10"
	      title="Enter one URI per line."></textarea>
    <br /><br />
    <fieldset>
      <legend>Supported grant types</legend>
      <input name="grants[]"
	     type="checkbox"
	     value="authorization_code"
	     id="chk:authorization-code"
	     checked="checked" />
      <label for="chk:authorization-code">Authorization Code</label>
      <br /><br />

      <input name="grants[]"
	     type="checkbox"
	     value="refresh_token"
	     id="chk:refresh-token" />
      <label for="chk:refresh-token">Refresh Token</label>
    </fieldset>
  </fieldset>

  <fieldset>
    <legend>User information</legend>

    <p>The user to register this client for</p>
    <select name="user" 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>
  </fieldset>
  
  <input type="submit" value="register client" />
</form>
{%endblock%}