Modified HTML pages

This commit is contained in:
David Allen 2024-03-10 20:19:48 -06:00
parent 6d63211d35
commit 45e8cd7f15
No known key found for this signature in database
GPG key ID: 1D2A29322FBB6FCB
2 changed files with 33 additions and 9 deletions

View file

@ -1,6 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
Welcome to Opaal's default login in page! Click the link below to log in with your identity provider: </br></br> Welcome to Opaal's default login in page! Click the link below to log in for an access token. </br></br>
{{loginButtons}}
<a href="{{ loginUrl }}">Login</a>
</html> </html>

View file

@ -1,13 +1,36 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
Success! Here's you access token: <script>
function copyText() {
// Get the text field
var copyText = document.getElementById("token");
{{access_token}} // Select the text field
... copyText.select();
You will need this token to access protected services and resources. copyText.setSelectionRange(0, 99999); // For mobile devices
Make sure to include it in the authorization header when making a HTTP request:
curl -k http://smd:27779/hsm/v2/Inventory/RedfishEndpoints -H "authorization: Bearer [access_token]" // Copy the text inside the text field
navigator.clipboard.writeText(copyText.value);
When you done, you can close this page. // Alert the copied text
alert("Copied the text: " + copyText.value);
}
</script>
<p>
Login successful! Here is your access token: </br>
<br>
<!-- The text field -->
<input type="text" value="{{accessToken}}" style="width: 350px" 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 http://smd:27779/hsm/v2/Inventory/RedfishEndpoints -H "Authorization: Bearer [access_token]"
</pre>
When you done, you can close this page.<br>
</p>
</html> </html>