Add project files.

This commit is contained in:
2023-04-29 09:17:17 +03:00
commit 62178f1f32
493 changed files with 45863 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
<html>
<body>
<script>
// Based on: https://manfredsteyer.github.io/angular-oauth2-oidc/docs/additional-documentation/silent-refresh.html
const checks = [/[\?|&|#]code=/, /[\?|&|#]error=/, /[\?|&|#]token=/, /[\?|&|#]id_token=/];
function isResponse(str) {
let count = 0;
if (!str) {
return false;
}
for (let i = 0; i < checks.length; i++) {
if (str.match(checks[i])) return true;
}
return false;
}
let message = isResponse(location.hash) ? location.hash : '#' + location.search;
console.log("Silent refresh iframe is posting to the parent application, message:", message);
(window.opener || window.parent).postMessage(message, location.origin);
</script>
</body>
</html>