mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
Modified HTML pages
This commit is contained in:
parent
6d63211d35
commit
45e8cd7f15
2 changed files with 33 additions and 9 deletions
|
|
@ -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>
|
||||||
|
|
@ -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>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue