Commit b6e9682b authored by Nicolas Mérigot's avatar Nicolas Mérigot

refactor: rename element to sib-auth

parent 6c7fc313
Pipeline #1978 passed with stage
in 27 seconds
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
<script type="module" src="sib-oidc.js"></script> <script type="module" src="sib-oidc.js"></script>
</head> </head>
<body> <body>
<sib-oidc <sib-auth
data-authority="https://test-paris.happy-dev.fr/openid/" data-authority="https://test-paris.happy-dev.fr/openid/"
data-client_id="833925" data-client_id="833925"
></sib-oidc> ></sib-auth>
<h1>sib-oidc</h1> <h1>sib-oidc</h1>
<button id="reset">clear storage and set new URL</button> <button id="reset">clear storage and set new URL</button>
<button id="reload">reload</button> <button id="reload">reload</button>
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
<pre id="output"></pre> <pre id="output"></pre>
<script> <script>
sibOidc = document.querySelector('sib-oidc'); sibOidc = document.querySelector('sib-auth');
customElements.whenDefined('sib-oidc').then(() => { customElements.whenDefined('sib-auth').then(() => {
sibOidc.getUser().then(user => { sibOidc.getUser().then(user => {
console.log(user); console.log(user);
output.textContent = JSON.stringify(user, null, 2); output.textContent = JSON.stringify(user, null, 2);
......
...@@ -75,6 +75,6 @@ class SIBOidc extends HTMLElement { ...@@ -75,6 +75,6 @@ class SIBOidc extends HTMLElement {
} }
} }
customElements.define('sib-oidc', SIBOidc); customElements.define('sib-auth', SIBOidc);
export default SIBOidc; export default SIBOidc;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment