The goal we seek is to allow our website (registered) users to use the SCLogin module for both logging into our site, and also logging into their Tableau Online user seat. (the user will already have an established Tableau Online account, fyi). When the user logs into our site via SCLogin, they are simultaneously logged in to their Tableau account, too. We will likely not enable self registration by the user, as we will create their Joomla login credentials to be same as their existing Tableau login credentials. We would want to ensure the user logs out of Tableau upon logging out of Joomla, too.
Q?: Could the existing SCLogin code be customized to accomplish this?
Q?: ...or, would this need to be a separate customized login module apart from SC Login?
Q?: ...or, is there a better alternative method to accomplish the process we seek?
Here is the start of our coding efforts, fyi. So far, we've not been able to successfully do the tunneling required for simultaneous logins. Our initial thought is we need to create a certain encrypted key using the public key from Tableau and a private key along with the modulus and exponent from Tableau.
Thanks in advance!
<?php
//$filename = 'Math/BigInteger.php';
//if (file_exists($filename)) {
//echo "The file $filename exists";
//} else {
//echo "The file $filename does not exist";
//}
echo '<br/>';
echo '<br/>';
include('Crypt/RSA.php');
include('Math/BigInteger.php');
//$url = '
online.tableausoftware.com/auth.xml';
//$xml = simplexml_load_file($url);
// get modulus, exponent and auth_token
//$modulus=$xml->modulus;
//$exponent=$xml->exponent;
//$auth_token=$xml->authenticity_token;
$modulus='8224328b0b5df7af2debf17307a013fb9296aab6b5bede535d4636c356a5055afac89934a96f326b220b0374c6c22ce795ad18d3ebfbc6981175cb38166374c37348ea2c312198f3805e0ed5a08990ee9ec235344c3e2d7d492494efb12136c8d6430a69ab3e1f33d08f7443d5161ffdfda8252ba87f937514d7cab10fe7bb2b';
$exponent='10001';
$auth_token='iXppBk8KtzbG7A4JQL0QJAWz5n5+JRbgNrzCpMeVGGI=';
echo $modulus;
echo '<br/>';
echo $exponent;
echo '<br/>';
echo $auth_token;
echo '<br/>';
$rsa = new Crypt_RSA();
$rsa->loadKey(
array(
'e' => new Math_BigInteger($exponent, 16),
'n' => new Math_BigInteger($modulus, 16)
)
);
$rsa->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1);
echo 'ENCRYPTED ';
echo $rsa->encrypt('1234567890');
echo 'DONE';
echo '</br>';
?>