anchor.diff:          document.getElementById('sp-certificate').value = btoa(spCertificate);
       }
   
  +    function decodeSPCertificate() {
  +        var spCertificate = document.getElementById('sp-certificate').value;
  +        document.getElementById('sp-certificate').value = atob(spCertificate);
  +    }
  +
       function updateBeanAndRedirect(redirectURL) {
           var numberOfClaimMappings = document.getElementById("claimMappingAddTable").rows.length;
           document.getElementById('number_of_claim_mappings').value = numberOfClaimMappings;
  
positive.code:                 });
              }
          });
      }
  
      function onSamlSsoClick() {
  
negative.code: 
          var numberOfRoleMappings = document.getElementById("roleMappingAddTable").rows.length;
          document.getElementById('number_of_rolemappings').value = numberOfRoleMappings;
          encodeSPCertificate();
  
          $.ajax({
              type: "POST",
  