Lindenii Project Forge
Login

server

Vireo IdP server

Hi… I am well aware that this diff view is very suboptimal. It will be fixed when the refactored server comes along!

Commit info
ID
f135edf4af1ba1e3bf295761b03eadf6bc43660e
Author
Author date
Mon, 19 Feb 2024 17:35:00 +0100
Committer
Committer date
Mon, 19 Feb 2024 17:35:14 +0100
Actions
Push cancel buttons to the right
{{ template "head.html" }}

<main>

<h1>sinwon</h1>

<p>
	Authorize
	{{ if .Client.ClientURI }}
		<a href="{{ .Client.ClientURI }}" target="_blank">
	{{ end }}
	{{- if .Client.ClientName -}}
		{{- .Client.ClientName -}}
	{{- else -}}
		<code>{{- .Client.ClientID -}}</code>
	{{- end -}}
	{{- if .Client.ClientURI -}}
		</a>
	{{- end -}}
	?
</p>

<form method="post" action="">
	<button type="submit" name="deny">Cancel</button>
	<button type="submit" name="authorize">Authorize</button>
	<button type="submit" name="deny">Cancel</button>
</form>

</main>

{{ template "foot.html" }}
{{ template "head.html" }}

<main>

<h1>sinwon</h1>

<form method="post" action="">
	{{ if .Client.ClientID }}
		Client ID: <code>{{ .Client.ClientID }}</code><br>
	{{ end }}
	Name: <input type="text" name="client_name" value="{{ .Client.ClientName }}"><br>
	Website: <input type="url" name="client_uri" value="{{ .Client.ClientURI }}"><br>

	Client type:
	{{ if .Client.ID }}
		{{ if .Client.IsPublic }}
			public
		{{ else }}
			confidential
		{{ end }}
		<br>
	{{ else }}
		<br>
		<label>
			<input type="radio" name="client_type" value="confidential" checked>
			Confidential
		</label>
		<br>
		<label>
			<input type="radio" name="client_type" value="public">
			Public
		</label>
		<br>
	{{ end }}

	Redirect URIs:<br>
	<textarea name="redirect_uris">{{ .Client.RedirectURIs }}</textarea><br>
	<small>The special URI <code>http://localhost</code> matches all loopback interfaces.</small><br>

	<a href="/"><button type="button">Cancel</button></a>
	<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" }}
{{ template "head.html" }}

<main>

<h1>sinwon</h1>

<form method="post" action="">
	Username: <input type="text" name="username" value="{{ .User.Username }}" required><br>
	Password: <input type="password" name="password"><br>
	{{ if not (eq .Me.ID .User.ID) }}
		<label>
			<input type="checkbox" name="admin" {{ if .User.Admin }}checked{{ end }}>
			Administrator
		</label><br>
	{{ end }}

	<a href="/"><button type="button">Cancel</button></a>
	<button type="submit">
		{{ if .User.ID }}
			Update user
		{{ else }}
			Create user
		{{ end }}
	</button>
	<a href="/"><button type="button">Cancel</button></a>
</form>

</main>

{{ template "foot.html" }}