Widget: RegistrationButton: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Kiehl (talk | contribs)
No edit summary
Kiehl (talk | contribs)
No edit summary
Line 7: Line 7:
     clientId: 'https://links.communitycenter.eu/simplesaml/module.php/saml/sp/metadata.php/default-sp'
     clientId: 'https://links.communitycenter.eu/simplesaml/module.php/saml/sp/metadata.php/default-sp'
});
});
             keycloak.init().then(function(authenticated) {
             /*keycloak.init().then(function(authenticated) {
                 alert(authenticated ? 'authenticated' : 'not authenticated');
                 alert(authenticated ? 'authenticated' : 'not authenticated');
             }).catch(function() {
             }).catch(function() {
                 alert('failed to initialize');
                 alert('failed to initialize');
             });
             });*/
keycloak.init()
keycloak.createRegisterUrl()
         }
         }
     </script>
     </script>

Revision as of 13:48, 7 December 2021

   <script src="https://idm.safetyid.eu/auth/js/keycloak.js"></script>
   <script>
       function initKeycloak() {
           var keycloak = new Keycloak({
   url: 'https://idm.safetyid.eu/auth',
   realm: 'SafetyID',
   clientId: 'https://links.communitycenter.eu/simplesaml/module.php/saml/sp/metadata.php/default-sp'

});

           /*keycloak.init().then(function(authenticated) {
               alert(authenticated ? 'authenticated' : 'not authenticated');
           }).catch(function() {
               alert('failed to initialize');
           });*/

keycloak.init() keycloak.createRegisterUrl()

       }
   </script>

<script type="text/javascript">

 initKeycloak()

</script>