SSO : Creation d'un mot de passe en automatique
This commit is contained in:
parent
a09b794883
commit
944af4a173
@ -82,7 +82,8 @@ class Gestion extends Scores_Ws_Server
|
||||
* @param string $token
|
||||
* @param AuthParam[] $params
|
||||
* @throws SoapFault
|
||||
* @return boolean|string
|
||||
* @return mixed
|
||||
* Retourne FALSE or HASH to connect
|
||||
*/
|
||||
public function ssoAuthenticate($client, $login, $token, $params)
|
||||
{
|
||||
@ -95,7 +96,7 @@ class Gestion extends Scores_Ws_Server
|
||||
$login = $part;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Extract login from database
|
||||
*/
|
||||
$userM = new Application_Model_Sdv1Utilisateurs();
|
||||
@ -130,7 +131,7 @@ class Gestion extends Scores_Ws_Server
|
||||
}
|
||||
|
||||
/**
|
||||
* Process token
|
||||
* Process token - uniquement compatible In Extenso
|
||||
*/
|
||||
$key = 'rh5s4z';
|
||||
$maxTime = time() + (15 * 60);
|
||||
@ -828,7 +829,7 @@ class Gestion extends Scores_Ws_Server
|
||||
* @throws SoapFault
|
||||
* @return boolean
|
||||
*/
|
||||
protected function setUser($data, $id = null)
|
||||
public function setUser($data, $id = null)
|
||||
{
|
||||
$this->authenticate();
|
||||
|
||||
@ -923,9 +924,6 @@ class Gestion extends Scores_Ws_Server
|
||||
return false;
|
||||
}
|
||||
|
||||
//Tout est ok, envoi email de validation
|
||||
//@todo : sendEmail
|
||||
|
||||
return true;
|
||||
|
||||
} else {
|
||||
@ -959,10 +957,10 @@ class Gestion extends Scores_Ws_Server
|
||||
|
||||
/**
|
||||
* Création de compte client partenaire
|
||||
* @param unknown $data
|
||||
* @param string $data
|
||||
* @return boolean
|
||||
*/
|
||||
public function setUserSSO($data)
|
||||
public function setUserSSO ( $data )
|
||||
{
|
||||
//Check IP application
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
@ -1027,7 +1025,7 @@ class Gestion extends Scores_Ws_Server
|
||||
$userData[$key] = $value;
|
||||
}
|
||||
}
|
||||
$userData['password'] = password_hash ( uniqid() , PASSWORD_BCRYPT );;
|
||||
$userData['password'] = password_hash ( uniqid() , PASSWORD_BCRYPT );
|
||||
$userData['dateInsert'] = date('YmdHis');
|
||||
|
||||
//Insertion dans la base de données
|
||||
@ -1050,9 +1048,6 @@ class Gestion extends Scores_Ws_Server
|
||||
return false;
|
||||
}
|
||||
|
||||
//Tout est ok, envoi email de validation
|
||||
//@todo : sendEmail
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1171,6 +1166,16 @@ class Gestion extends Scores_Ws_Server
|
||||
|
||||
}
|
||||
|
||||
protected function setLinkValidation()
|
||||
{
|
||||
//Génération d'un hash pour la validation email
|
||||
//Database : utilisateurs_validationh [id, ]
|
||||
|
||||
//utilisateurs_email => dateValidation + surveillance
|
||||
|
||||
//Envoi email avec lien de validation
|
||||
}
|
||||
|
||||
protected function setUserValidation($id)
|
||||
{
|
||||
//Un utilisateur valide son compte pour la première connexion et déclenche l'envoi de validation de l'email
|
||||
|
Loading…
Reference in New Issue
Block a user