当前位置: 首页>>代码示例>>PHP>>正文


PHP Sessions::verifySession方法代码示例

本文整理汇总了PHP中Sessions::verifySession方法的典型用法代码示例。如果您正苦于以下问题:PHP Sessions::verifySession方法的具体用法?PHP Sessions::verifySession怎么用?PHP Sessions::verifySession使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sessions的用法示例。


在下文中一共展示了Sessions::verifySession方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elseif

 function __isAuthenticated()
 {
     return true;
     if (array_key_exists('HTTP_AUTH_KEY', $_SERVER)) {
         $authKey = $_SERVER['HTTP_AUTH_KEY'];
     } elseif (array_key_exists('auth_key', $_GET)) {
         $authKey = $_GET['auth_key'];
     } else {
         throw new RestException(401, 'Authentication Required');
     }
     $sessions = new Sessions();
     $session = $sessions->verifySession($authKey);
     if (is_array($session)) {
         $sesInfo = $sessions->getSessionUser($authKey);
         self::$userId = $sesInfo['USR_UID'];
         self::$authKey = $authKey;
         return true;
     }
     throw new RestException(401, 'Wrong Credentials!');
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:20,代码来源:Auth.php

示例2: Sessions

 $noLoginFiles[] = 'heartbeatStatus';
 $noLoginFiles[] = 'showLogoFile';
 $noLoginFiles[] = 'forgotPassword';
 $noLoginFiles[] = 'retrivePassword';
 $noLoginFiles[] = 'defaultAjaxDynaform';
 $noLoginFiles[] = 'dynaforms_checkDependentFields';
 $noLoginFolders[] = 'services';
 $noLoginFolders[] = 'tracker';
 $noLoginFolders[] = 'installer';
 // This sentence is used when you lost the Session
 if (!in_array(SYS_TARGET, $noLoginFiles) && !in_array(SYS_COLLECTION, $noLoginFolders) && $bWE != true && $collectionPlugin != 'services') {
     $bRedirect = true;
     if (isset($_GET['sid'])) {
         G::LoadClass('sessions');
         $oSessions = new Sessions();
         if ($aSession = $oSessions->verifySession($_GET['sid'])) {
             require_once 'classes/model/Users.php';
             $oUser = new Users();
             $aUser = $oUser->load($aSession['USR_UID']);
             $_SESSION['USER_LOGGED'] = $aUser['USR_UID'];
             $_SESSION['USR_USERNAME'] = $aUser['USR_USERNAME'];
             $bRedirect = false;
             $RBAC->initRBAC();
             $RBAC->loadUserRolePermission($RBAC->sSystem, $_SESSION['USER_LOGGED']);
             $memKey = 'rbacSession' . session_id();
             $memcache->set($memKey, $RBAC->aUserInfo, PMmemcached::EIGHT_HOURS);
         }
     }
     if ($bRedirect) {
         if (substr(SYS_SKIN, 0, 2) == 'ux' && SYS_SKIN != 'uxs') {
             // verify if the current skin is a 'ux' variant
开发者ID:rodriquelca,项目名称:processmaker,代码行数:31,代码来源:sysGeneric.php

示例3: isValidSession

/**
 * **********
 * #added By Erik AO <erik@colosa.com> in datetime 26.06.2008 10:00:00
 * # modified 12-01-2010 by erik
 */
function isValidSession($sessionId)
{
    G::LoadClass('sessions');
    $oSessions = new Sessions();
    $session = $oSessions->verifySession($sessionId);
    if (is_array($session)) {
        return new wsResponse(0, G::LoadTranslation('ID_SESSION_ACTIVE'));
    } else {
        return new wsResponse(9, G::LoadTranslation('ID_SESSION_EXPIRED'));
    }
}
开发者ID:bqevin,项目名称:processmaker,代码行数:16,代码来源:soap2.php

示例4: ifSessionExpiredBreakThis

function ifSessionExpiredBreakThis($sessionId)
{
    #added By Erik AO <erik@colosa.com> in datetime 26.06.2008 10:00:00
    G::LoadClass('sessions');
    $oSessions = new Sessions();
    $session = $oSessions->verifySession($sessionId);
    if ($session == '') {
        G::LoadClass('wsResponse');
        return new wsResponse(9, G::LoadTranslation('ID_SESSION_EXPIRED'));
    }
}
开发者ID:emildev35,项目名称:processmaker,代码行数:11,代码来源:soap.php

示例5: isValidSession

/**
 * **********
 * #added By Erik AO <erik@colosa.com> in datetime 26.06.2008 10:00:00
 * # modified 12-01-2010 by erik
 */
function isValidSession($sessionId)
{
    G::LoadClass('sessions');
    $oSessions = new Sessions();
    $session = $oSessions->verifySession($sessionId);
    if (is_array($session)) {
        return new wsResponse(0, 'Session active');
    } else {
        return new wsResponse(9, 'Session expired');
    }
}
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:16,代码来源:soap2.php

示例6: verifyUserSession

 public function verifyUserSession($target, $collection)
 {
     // this is the blank list to allow execute scripts with no login (without session started)
     $noLoginFiles = $noLoginFolders = array();
     $noLoginFiles[] = 'login';
     $noLoginFiles[] = 'authentication';
     $noLoginFiles[] = 'login_Ajax';
     $noLoginFiles[] = 'dbInfo';
     $noLoginFiles[] = 'sysLoginVerify';
     $noLoginFiles[] = 'processes_Ajax';
     $noLoginFiles[] = 'updateTranslation';
     $noLoginFiles[] = 'autoinstallProcesses';
     $noLoginFiles[] = 'autoinstallPlugins';
     $noLoginFiles[] = 'heartbeatStatus';
     $noLoginFiles[] = 'showLogoFile';
     $noLoginFiles[] = 'forgotPassword';
     $noLoginFiles[] = 'retrivePassword';
     $noLoginFiles[] = 'defaultAjaxDynaform';
     $noLoginFiles[] = 'dynaforms_checkDependentFields';
     $noLoginFolders[] = 'services';
     $noLoginFolders[] = 'tracker';
     $noLoginFolders[] = 'installer';
     // This sentence is used when you lost the Session
     if (!in_array(SYS_TARGET, $noLoginFiles) && !in_array(SYS_COLLECTION, $noLoginFolders) && $bWE != true && $collectionPlugin != 'services' && !$isRestRequest) {
         $bRedirect = true;
         if (isset($_GET['sid'])) {
             G::LoadClass('sessions');
             $oSessions = new Sessions();
             if ($aSession = $oSessions->verifySession($_GET['sid'])) {
                 require_once 'classes/model/Users.php';
                 $oUser = new Users();
                 $aUser = $oUser->load($aSession['USR_UID']);
                 $_SESSION['USER_LOGGED'] = $aUser['USR_UID'];
                 $_SESSION['USR_USERNAME'] = $aUser['USR_USERNAME'];
                 $bRedirect = false;
                 $RBAC->initRBAC();
                 $RBAC->loadUserRolePermission($RBAC->sSystem, $_SESSION['USER_LOGGED']);
                 $memKey = 'rbacSession' . session_id();
                 $memcache->set($memKey, $RBAC->aUserInfo, PMmemcached::EIGHT_HOURS);
             }
         }
         if ($bRedirect) {
             if (substr(SYS_SKIN, 0, 2) == 'ux' && SYS_SKIN != 'uxs') {
                 // verify if the current skin is a 'ux' variant
                 $loginUrl = 'main/login';
             } else {
                 if (strpos($_SERVER['REQUEST_URI'], '/home') !== false) {
                     //verify is it is using the uxs skin for simplified interface
                     $loginUrl = 'home/login';
                 } else {
                     $loginUrl = 'login/login';
                     // just set up the classic login
                 }
             }
             if (empty($_POST)) {
                 header('location: ' . SYS_URI . $loginUrl . '?u=' . urlencode($_SERVER['REQUEST_URI']));
             } else {
                 if ($isControllerCall) {
                     header("HTTP/1.0 302 session lost in controller");
                 } else {
                     header('location: ' . SYS_URI . $loginUrl);
                 }
             }
             die;
         }
     }
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:67,代码来源:PmBootstrap.php


注:本文中的Sessions::verifySession方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。