<?php
namespace App\service;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class servicesGlobale
{
public function __construct(SessionInterface $session , RequestStack $request )
{
$this->session = $session;
$this->request = $request ;
$this->sadmin_l = "sadmin_akoya";
$this->salt1 = "Qs94fzL8F" ;
$this->salt2 = "5ZQiBq4k8" ;
$password = "i5wMXi2mhEZzzx27gb0Ld0se" ;
$this->sadmin_p = sha1($this->salt1.$password.$this->salt2) ;
}
public function verifSession()
{
if($this->session->get('userxYtssA') == null ){
return false ;
}
else{
return true ;
}
}
public function sadmin($username , $password)
{
if(( $this->sadmin_l == $username )&&( $this->sadmin_p == sha1( $this->salt1.$password.$this->salt2) )){
return 'Qs94fzL8F' ;
}
}
function getUrls(){
$urls = [
'url_site'=> 'https://akoya.services-unifies.fr' ,
'url_dashboard'=> 'https://akoyaconfig.services-unifies.fr' ,
] ;
return $urls ;
}
}
?>