mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 11:37:01 -07:00
42 lines
No EOL
1.2 KiB
HTML
42 lines
No EOL
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="static/stylesheets/styles.css">
|
|
<title>Success!</title>
|
|
</head>
|
|
<script>
|
|
function copyText() {
|
|
// Get the text field
|
|
var copyText = document.getElementById("token");
|
|
|
|
// Select the text field
|
|
copyText.select();
|
|
copyText.setSelectionRange(0, 99999); // For mobile devices
|
|
|
|
// Copy the text inside the text field
|
|
navigator.clipboard.writeText(copyText.value);
|
|
|
|
// Alert the copied text
|
|
alert("Text copied: " + copyText.value);
|
|
}
|
|
</script>
|
|
<div id="wrapper">
|
|
<p>
|
|
Login successful! Here is your access token: </br>
|
|
<br>
|
|
<!-- The text field -->
|
|
<input type="text" value="{{accessToken}}" style="width: 400px" id="token" readonly>
|
|
|
|
<!-- The button used to copy the text -->
|
|
<button onclick="copyText()">Copy</button>
|
|
<br><br>
|
|
You will need this token to access protected services and resources.<br>
|
|
Make sure to include it in the authorization header if you are making a HTTP request.<br><br>
|
|
<pre>
|
|
curl -k https://service/doSomething -H "Authorization: Bearer $access_token"
|
|
</pre>
|
|
|
|
After you have saved your token, you can close this page.<br>
|
|
</p>
|
|
</div>
|
|
</html> |