aboutsummaryrefslogtreecommitdiff
path: root/gn3/templates/oauth2/authorise-user.html
blob: b9284e5b43e4975e27bd5bc05ede88fca85891fa (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
{%extends "base.html"%}

{%block title%}Authorise User{%endblock%}

{%block pagetitle%}Authenticate to the API Server{%endblock%}

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

<form method="POST" action="{{url_for('oauth2.auth.authorise')}}">
  <input type="hidden" name="response_type" value="{{response_type}}" />
  <input type="hidden" name="scope" value="{{scope | join(' ')}}" />
  <input type="hidden" name="client_id" value="{{client.client_id}}" />
  <p>
    You are authorising "{{client.client_metadata.client_name}}" to access
    Genenetwork 3 with the following scope:
  </p>
  <fieldset>
    <legend>Scope</legend>
    {%for scp in scope%}
    <div class="checkbox disabled">
      <label for="scope:{{scp}}">
	<input id="scope:{{scp}}" type="checkbox" name="scope[]" value="{{scp}}"
	       checked="checked" disabled="disabled" />
	{{scp}}
      </label>
    </div>
    {%endfor%}
  </fieldset>

  <fieldset>
    <legend>User Credentials</legend>
    <fieldset class="form-group">
      <label for="user:email" class="form-label">Email</label>
      <input type="email" name="user:email" id="user:email" required="required"
	     class="form-control"/>
    </fieldset>

    <fieldset class="form-group">
    <label for="user:password" class="form-label">Password</label>
    <input type="password" name="user:password" id="user:password"
	   required="required" class="form-control" />
    </fieldset>
  </fieldset>
  
  <input type="submit" value="authorise" class="btn btn-primary" />
</form>
{%endblock%}