PHP | How to log in an user in the backoffice (SSO)

Publié sur un an il y a par  Julien Pauthier

Publier un sujet
Julien Pauthier
Julien Pauthier Administrateur

You can use our API to generate a sign-on link to log in your users from an intranet portal or from a franchisee/partner account's dashboard. Here is a PHP script to do that:


<?php 
$email = "yourUserLoginOrEmailAddress@example.com"; // The user login
$timestamp = time()*1000;
$sessionTimeout = "600000"; // Link validity
$ssoToken = "8a7e65............";

header("Location: https://app.agendize.com/sso/1.0/sso?email=" . urlencode($email) . "&ts=" . $timestamp
 . "&mac=" . hash_hmac ("sha256", $email . $timestamp . $sessionTimeout, $ssoToken) . "&errorPage=http://app.agendize.com?error");
?>


0 Votes


0 Commentaires

Connexion ou S'inscrire pour poster un commentaire