{%extends "base.html"%} {%block title%}gn-auth: View OAuth2 Client{%endblock%} {%block pagetitle%}View OAuth2 Client{%endblock%} {%block content%} {{flash_messages()}} {%if client.is_nothing()%} <p>No such client</p> {%else%} {%set client = client.value%} <form method="POST" action="{{url_for('oauth2.admin.edit_client')}}"> <legend>View/Edit Oauth2 Client</legend> <input type="hidden" name="client_id" value="{{client.client_id}}" /> <input type="hidden" name="client_name" value="{{client.client_metadata.client_name}}" /> <div> <p><strong>Client ID: </strong> {{client.client_id}}</p> <p><strong>Client Name: </strong> {{client.client_metadata.client_name}}</p> </div> <div class="form-group"> <legend>Scope</legend> {%for scp in scope%} <div class="checkbox"> <label for="chk:{{scp}}"> <input name="scope[]" id="chk:{{scp}}" type="checkbox" value="{{scp}}" {%if scp in client.client_metadata.scope%} checked="checked" {%endif%} /> {{scp}}</label><br /> </div> {%endfor%} </div> <div class="form-group"> <legend>Redirect URIs</legend> <label for="txt-redirect-uri" class="form-label">Default Redirect URI</label> <br /> <input type="text" name="redirect_uri" id="txt-redirect-uri" value="{{client.client_metadata.default_redirect_uri}}" required="required" class="form-control" /> </div> <div class="form-group"> <label for="txta:other-redirect-uris" class="form-label">Other Redirect URIs</label> <textarea id="txta:other-redirect-uris" name="other_redirect_uris" cols="80" rows="10" class="form-control" title="Enter one URI per line." >{{"\r\n".join(client.client_metadata.redirect_uris)}}</textarea> </div> <div class="form-group"> <legend>Grants</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(' ', '-')}}" {%if granttype.value in client.client_metadata.grant_types%} checked="checked" {%endif%} /> {{granttype.name}} </label> </div> {%endfor%} </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" value="{{client.client_metadata.get('public-jwks-uri', '')}}" /> </div> <input type="submit" class="btn btn-primary" value="update client" /> </form> {%endif%} {%endblock%}