Subversion Repositories Applications.referentiel

Rev

Rev 344 | Rev 399 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 344 Rev 346
Line 564... Line 564...
564
	private function authentifier($message_accueil, $message_echec) {
564
	private function authentifier($message_accueil, $message_echec) {
565
		$id = $this->getAuthIdentifiant();
565
		$id = $this->getAuthIdentifiant();
566
		if (!isset($id)) {
566
		if (!isset($id)) {
567
			$this->envoyerAuth($message_accueil, $message_echec);
567
			$this->envoyerAuth($message_accueil, $message_echec);
568
		} else {
568
		} else {
569
			$autorisation = $this->etreCoordinateurAutorise();
569
			$autorisation = $this->etreCoordinateurAutorise($id);
570
			if ($autorisation == false) {
570
			if ($autorisation == false) {
571
				$this->envoyerAuth($message_accueil, $message_echec);
571
				$this->envoyerAuth($message_accueil, $message_echec);
572
			}
572
			}
573
		}
573
		}
574
		return true;
574
		return true;
575
	} 
575
	} 
Line 576... Line 576...
576
	
576
	
577
	public function etreCoordinateurAutorise($identifiant) {
-
 
578
		$identifiant = $this->getAuthIdentifiant();
577
	public function etreCoordinateurAutorise($identifiant) {
579
		$mdp = md5($this->getAuthMotDePasse());
578
		$mdp = md5($this->getAuthMotDePasse());
580
		$url = sprintf(Config::get('authentification.serviceUrlTpl'), $identifiant, $mdp);
579
		$url = sprintf(Config::get('authentification.serviceUrlTpl'), $identifiant, $mdp);
581
		$json = $this->getRestClient()->envoyerRequeteConsultation($url);
580
		$json = $this->getRestClient()->envoyerRequeteConsultation($url);
582
		$existe = json_decode($json);
581
		$existe = json_decode($json);