Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.
/template/manage-client.html (raw)
{{ template "head.html" .Base }}
{{ template "nav.html" .Base }}
<main>
<h2>
{{ if .Client.ID }}
Update client
{{ else }}
Create client
{{ end }}
</h2>
<form method="post" action="">
<input type="hidden" name="_csrf" value="{{ .Base.CSRFToken }}">
{{ if .Client.ClientID }}
Client ID: <code>{{ .Client.ClientID }}</code><br>
{{ end }}
<label>
Name
<input type="text" name="client_name" value="{{ .Client.ClientName }}">
</label>
<label>
Website
<input type="url" name="client_uri" value="{{ .Client.ClientURI }}">
</label>
{{ if .Client.ID }}
<p>
Client type
<br>
<strong>
{{ if .Client.IsPublic }}
Public
{{ else }}
Confidential
{{ end }}
</strong>
</p>
{{ else }}
Client type
<label>
<input type="radio" name="client_type" value="confidential" checked>
Confidential
</label>
<label>
<input type="radio" name="client_type" value="public">
Public
</label>
{{ end }}
<label>
Redirect URIs
<textarea name="redirect_uris" wrap="off">{{ .Client.RedirectURIs }}</textarea>
<small>The special URI <code>http://localhost</code> matches all loopback interfaces.</small><br>
</label>
<label>
PKCE requirement
<select name="pkce_requirement" {{ if not .Client.IsPublic }}disabled{{ end }}>
<option value="" {{ if eq .Client.PKCERequirement "" }}selected{{ end }}>Optional</option>
<option value="plain" {{ if eq .Client.PKCERequirement "plain" }}selected{{ end }}>Require PKCE (plain or S256)</option>
<option value="S256" {{ if eq .Client.PKCERequirement "S256" }}selected{{ end }}>Require PKCE (S256)</option>
</select>
<small>Applies to public clients only.</small>
</label>
<button type="submit">
{{ if .Client.ID }}
Update client
{{ else }}
Create client
{{ end }}
</button>
{{ if .Client.ID }}
{{ if not .Client.IsPublic }}
<button type="submit" name="rotate">Rotate client secret</button>
{{ end }}
<button type="submit" name="delete">Delete client</button>
{{ end }}
<a href="/"><button type="button">Cancel</button></a>
</form>
</main>
{{ template "foot.html" }}