Skip to content

Commit

Permalink
feat: qrcode loaded by client (#98)
Browse files Browse the repository at this point in the history
* new discovery and error page based on bootstrap-itali v2.6.1

* added id and class for errors

* chore: added dependency for django theme

* Fix: remove of non existing field of user

* feat: implemented Django template for the example sp

* chore: created static folder with static files

* fix: adding missing STATIC_ROOT

* fix: using {% static %} for static resources

* fix: removed unused code

* Update example_sp/djangosaml2_sp/saml2_sp/views.py

Co-authored-by: Giuseppe De Marco <[email protected]>

* Update example_sp/djangosaml2_sp/saml2_sp/views.py

Co-authored-by: Giuseppe De Marco <[email protected]>

* feat: dropdown for profile

* fix: resolved merge conflicts

* chore: removed comments on disco.html file

* feat: improved echo_attributes page

* feat: qrcode loaded by js library

* fix: qrcode_color set by parameter

---------

Co-authored-by: MDreW <[email protected]>
Co-authored-by: Giuseppe De Marco <[email protected]>
  • Loading branch information
3 people authored Dec 19, 2023
1 parent 4ad448e commit 9bf36a2
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 39 deletions.
1 change: 0 additions & 1 deletion Docker-compose/nginx/nginx.conf_uwsgi_pass
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ server {
# deny iFrame
add_header X-Frame-Options "DENY";

add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
Expand Down
45 changes: 13 additions & 32 deletions example/static/disco.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!-- ita-buyyon CSS -->
<link href="css/ita.min.css" rel="stylesheet">
<link href="css/ita-font.min.css" rel="stylesheet">
</head>
</head>
<body>
<!-- Container - Body of page-->
<div class="main-body">
Expand All @@ -37,18 +37,17 @@ <h3>IT Wallet</h3>
<br>
<div class="row">
<div class="col-lg-12 text-center button-container column-buttons">
<!-- IT Wallet IDP BUTTON SMALL "ENTRA CON WALLET ID" * begin * -->
<a href="https://localhost/Saml2/disco?entityID=wallet"
<!--IT Wallet IDP BUTTON SMALL "ENTRA CON WALLET ID" * begin *-->
<a href="https://localhost/Saml2/disco?entityID=wallet"
class="btn btn-primary btn-lg btn-me w-100"
eidas-idp-button="#eidas-idp-button-xlarge-post"
aria-haspopup="false"
aria-expanded="false"
style="font-size: 21px;"
onclick="loadIframe(this.href); return false;">
style="font-size: 21px;" >
<span><img class="icon buttonicon" src="/static/wallet-it/wallet_icon.svg" alt="Logo IT Wallet" /></span>
<span>Accedi con IT Wallet</span>
</a>
<!-- IT Wallet IDP BUTTON SMALL "ENTRA CON WALLET ID" * end * -->
<!--IT Wallet IDP BUTTON SMALL "ENTRA CON WALLET ID" * end *-->
</div>
</div>
<div class="row">
Expand Down Expand Up @@ -126,33 +125,12 @@ <h3>Altre identità digitali</h3>
</div>
</div>
</div>

<div id="iframeContainer">
<div id="innerBox">
<button id="closeButton">
<svg viewBox="0 0 24 24" width="24" height="24">
<path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"></path>
</svg>
</button>
<div id="inneriframeContainer"></div>
<!-- iframe goes here -->
<div id="theModal" class="modal fade text-center">
<div class="modal-dialog">
<div class="modal-content">
</div>
</div>
</div>

<script>
function loadIframe(url) {
var iframe = document.createElement('iframe');
iframe.src = url;
document.getElementById('inneriframeContainer').appendChild(iframe);
document.getElementById('iframeContainer').style.display = 'block';
}

document.getElementById('closeButton').addEventListener('click', function() {
var inneriframeContainer = document.getElementById('inneriframeContainer');
inneriframeContainer.innerHTML = '';
iframeContainer.style.display = 'none';
});
</script>
<!-- Footer -->
<!-- <footer class="it-footer">
<div class="it-footer-main">
Expand Down Expand Up @@ -299,6 +277,9 @@ <h3 class="sr-only">Sezione Link Utili</h3>
<script src="js/ita.min.js"></script>
<script src="js/bootstrap-italia.bundle.min.js"></script>

<script>var spid_idps = new Ita;</script>
<script>
var spid_idps = new Ita;
</script>

</body>
</html>
Loading

0 comments on commit 9bf36a2

Please sign in to comment.