diff options
author | Frederick Muriuki Muriithi | 2023-08-07 07:58:09 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-08-07 09:26:12 +0300 |
commit | 6d9c61dc0072b96b12153e64940b465306f25bfb (patch) | |
tree | a4957c7967e56b4527c1e926744a65a3326935ce /gn_auth/templates/oauth2 | |
parent | 6ab6d46ab4b1611ed72bdbce85cf9324ce69b305 (diff) | |
download | gn-auth-6d9c61dc0072b96b12153e64940b465306f25bfb.tar.gz |
Change imports to new unified db module.
Diffstat (limited to 'gn_auth/templates/oauth2')
-rw-r--r-- | gn_auth/templates/oauth2/authorise-user.html | 48 | ||||
-rw-r--r-- | gn_auth/templates/oauth2/oauth2_error.html | 16 |
2 files changed, 64 insertions, 0 deletions
diff --git a/gn_auth/templates/oauth2/authorise-user.html b/gn_auth/templates/oauth2/authorise-user.html new file mode 100644 index 0000000..b9284e5 --- /dev/null +++ b/gn_auth/templates/oauth2/authorise-user.html @@ -0,0 +1,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%} diff --git a/gn_auth/templates/oauth2/oauth2_error.html b/gn_auth/templates/oauth2/oauth2_error.html new file mode 100644 index 0000000..ec9a500 --- /dev/null +++ b/gn_auth/templates/oauth2/oauth2_error.html @@ -0,0 +1,16 @@ +{%extends "base.html"%} + +{%block title%}OAuth2 Error{%endblock%} + +{%block pagetitle%}Error: {{error.status_code}}{%endblock%} + +{%block content%} +{{flash_messages()}} + +There was an error trying to fulfill your request: + +<p> + <strong>{{error.error}}</strong>: + {{error.description}} +</p> +{%endblock%} |