![]() |
Documentación GVHIDRA 3.1.5
|
Métodos públicos | |
__construct () | |
fetchData ($username, $password, $isChallengeResponse=false) | |
getDatos () | |
getResponse () | |
postLogin ($sess, $aut=null) | |
Métodos públicos estáticos | |
static | autenticate ($p_apli) |
Campos de datos | |
$response = null |
Definición en la línea 11 del archivo AuthBasic.php.
__construct | ( | ) |
Definición en la línea 16 del archivo AuthBasic.php.
{ parent::__construct(); $this->datos=array( 'bd'=>'bd-usuario', // servidor bd 'server'=>'http', // servidor web ); }
static autenticate | ( | $ | p_apli | ) | [static] |
Metodo para llamar desde aplicaciones, en la autenticacion inicial
Devuelve cadena vacia si todo va bien, o texto si error
Reimplementado de gvhBaseAuth.
Definición en la línea 64 del archivo AuthBasic.php.
{ $auth_container = new self($p_apli); IgepSession::session_start($p_apli, false); $aut = new Auth($auth_container,'','loginFunction'); $aut->setSessionName($p_apli); if (isset($_GET['logout'])) $aut->logout(); $aut->start(); $resp = $auth_container->getResponse(); if ($aut->checkAuth()) { $aut->setAuthData('response',$resp); $auth_container->open('igep/include/valida/validacion.php'); return ''; } else { if (isset($resp)) return $resp->getMessage(); else return ''; // ocurre cuando no hay usuario/password } }
fetchData | ( | $ | username, |
$ | password, | ||
$ | isChallengeResponse = false |
||
) |
Metodo para autenticar usuario
Reimplementado de gvhBaseAuth.
Definición en la línea 26 del archivo AuthBasic.php.
{ // Check If valid etc if($username=='invitado' and md5('salto-pre'.$password.'salto-post')=='19fda1814a6fc1c51c6ceb14ea92fba7') { // Perform Some Actions return true; } return false; }
getDatos | ( | ) |
Definición en la línea 36 del archivo AuthBasic.php.
{
return $this->datos;
}
getResponse | ( | ) |
Definición en la línea 41 del archivo AuthBasic.php.
{
return $this->response;
}
postLogin | ( | $ | sess, |
$ | aut = null |
||
) |
Inicializa variables en la sesion que recibe. Se ejecuta la primera vez que accede a la aplicacion
Definición en la línea 50 del archivo AuthBasic.php.
{ $sess['usuario']['nombre']='Usuario Invitado'; $sess['rolusuar'] = 'perfil_por_definir'; $sess['modulos'] = array(); $sess['daplicacion'] = 'Aplicacin de ejemplo con gvHIDRA'; return $sess; }
$response = null |
Definición en la línea 14 del archivo AuthBasic.php.