Security

last person joined: 19 hours ago 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

[How-to] Send auto login link via SMS for ClearPass guests

This thread has been viewed 9 times
  • 1.  [How-to] Send auto login link via SMS for ClearPass guests

    EMPLOYEE
    Posted Dec 11, 2019 04:10 AM

    Use case:

    A customer wants guests to self register using their mobile number and after registration they'll recive an SMS message with a one click auto login link.

     

    Steps:

    1. From Guest > Configuration  > Receipt  > Templates > SMS Recipt
    2. add the link of your guest portal page plus 
      ?username={$u.username|escape}&password={$u.password|escape}
      For example: 
      https://clearpass.arubademo.net/guest/login.php?username={$u.username|escape}&password={$u.password|escape}
    3. From Guest > Configuration  > Pages > Guest Self Registration  OR Login pages (depends where your login page is)
    4. Add to the HTML header of the login page the following script 
      {literal}
       
        <script type="text/javascript">
          window.onload=function(){
            var myEle = document.getElementById("ERROR_"+_form_name+"_user");
            var myusername = document.getElementById("ID_"+_form_name+"_user");
            var mypassword = document.getElementById("ID_"+_form_name+"_password");
       
            if(myEle == null && (myusername.value!="" && mypassword.value!="")){
              var auto = setTimeout(function(){ autoRefresh(); }, 100);
              }
       
            function submitform(){
            document.forms[_form_name].submit();
            }
           
            function autoRefresh(){
            clearTimeout(auto);
            auto = setTimeout(function(){ submitform(); autoRefresh(); }, 1000);
            }
          }
        </script>
       
      {/literal}
      The script will auto submit the login form based on those conditions:
      1. Username and password exists
      2. No error message is visible (to avoid loops)

    Thanks,



  • 2.  RE: [How-to] Send auto login link via SMS for ClearPass guests

    Posted Jan 16, 2024 10:47 AM

    Could you explain this in a bit more detail please