date.chapril.org-framadate/app/classes/Framadate/Services/SecurityService.php

20 lines
408 B
PHP
Raw Normal View History

2015-01-09 09:22:31 +01:00
<?php
namespace Framadate\Services;
use Framadate\Security\Token;
class SecurityService {
function __construct() {
}
function getToken($tokan_name) {
if (!isset($_SESSION['token']) || !isset($_SESSION['token'][$tokan_name])) {
$_SESSION['token'][$tokan_name] = new Token($tokan_name, 60*5);
}
return $_SESSION['token'][$tokan_name]->getValue();
}
}