71d4e05fb6
This is a new pacakge internal/oidc/provider/formposthtml containing a number of static files embedded using the relatively recent Go "//go:embed" functionality introduced in Go 1.16 (https://blog.golang.org/go1.16). The Javascript and CSS files are minifiied and injected to make a single self-contained HTML response. There is a special Content-Security-Policy helper to calculate hash-based script-src and style-src rules. This new code is covered by a new integration test that exercises the JS/HTML functionality in a real browser outside of the rest of the Supervisor. Signed-off-by: Matt Moyer <moyerm@vmware.com>
35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
<!--
|
|
Copyright 2021 the Pinniped contributors. All Rights Reserved.
|
|
SPDX-License-Identifier: Apache-2.0
|
|
--><!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<style>{{ minifiedCSS }}</style>
|
|
<script>{{ minifiedJS }}</script>
|
|
<link id="favicon" rel="icon"/>
|
|
</head>
|
|
<body>
|
|
<noscript>
|
|
To finish logging in, paste this authorization code into your command-line session: {{ .Parameters.Get "code" }}
|
|
</noscript>
|
|
<form>
|
|
<input type="hidden" name="redirect_uri" value="{{ .RedirURL }}"/>
|
|
<input type="hidden" name="encoded_params" value="{{ .Parameters.Encode }}"/>
|
|
</form>
|
|
<div id="loading" class="state" data-favicon="⏳" data-title="Logging in..." hidden></div>
|
|
<div id="success" class="state" data-favicon="✅" data-title="Login succeeded" hidden>
|
|
<h1>Login succeeded</h1>
|
|
<p>You have successfully logged in. You may now close this tab.</p>
|
|
</div>
|
|
<div id="manual" class="state" data-favicon="⌛" data-title="Finish your login" hidden>
|
|
<h1>Finish your login</h1>
|
|
<p>To finish logging in, paste this authorization code into your command-line session:</p>
|
|
<button id="manual-copy-button">
|
|
<span class="copy-icon"></span>
|
|
<code id="manual-auth-code">{{ .Parameters.Get "code" }}</code>
|
|
</button>
|
|
</div>
|
|
</body>
|
|
</html>
|