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


PHP SimpleSAML_Auth_State::deleteState方法代码示例

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


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

示例1: completeLogout

 /**
  * Complete logout.
  *
  * This function should be called after logout has completed. It will never return,
  * except in the case of exceptions. Exceptions thrown from this page should not be caught,
  * but should instead be passed to the top-level exception handler.
  *
  * @param array &$state  Information about the current authentication.
  */
 public static function completeLogout(&$state)
 {
     assert('is_array($state)');
     assert('array_key_exists("LogoutCompletedHandler", $state)');
     SimpleSAML_Auth_State::deleteState($state);
     $func = $state['LogoutCompletedHandler'];
     assert('is_callable($func)');
     call_user_func($func, $state);
     assert(FALSE);
 }
开发者ID:williamamed,项目名称:Raptor2,代码行数:19,代码来源:Source.php

示例2: logout

 /**
  * Log out from this authentication source.
  *
  * This function should be overridden if the authentication source requires special
  * steps to complete a logout operation.
  *
  * If the logout process requires a redirect, the state should be saved. Once the
  * logout operation is completed, the state should be restored, and completeLogout
  * should be called with the state. If this operation can be completed without
  * showing the user a page, or redirecting, this function should return.
  *
  * @param array &$state  Information about the current logout operation.
  */
 public function logout(&$state)
 {
     assert('is_array($state)');
     $logoutUrl = $this->_casConfig['logout'];
     SimpleSAML_Auth_State::deleteState($state);
     // we want cas to log us out
     SimpleSAML_Utilities::redirect($logoutUrl, array());
 }
开发者ID:filonuse,项目名称:fedlab,代码行数:21,代码来源:CAS.php

示例3: resumeProcessing

 /**
  * Continues processing of the state.
  *
  * This function is used to resume processing by filters which for example needed to show
  * a page to the user.
  *
  * This function will never return. Exceptions thrown during processing will be passed
  * to whatever exception handler is defined in the state array.
  *
  * @param array $state  The state we are processing.
  */
 public static function resumeProcessing($state)
 {
     assert('is_array($state)');
     while (count($state[self::FILTERS_INDEX]) > 0) {
         $filter = array_shift($state[self::FILTERS_INDEX]);
         try {
             $filter->process($state);
         } catch (SimpleSAML_Error_Exception $e) {
             SimpleSAML_Auth_State::throwException($state, $e);
         } catch (Exception $e) {
             $e = new SimpleSAML_Error_UnserializableException($e);
             SimpleSAML_Auth_State::throwException($state, $e);
         }
     }
     /* Completed. */
     assert('array_key_exists("ReturnURL", $state) || array_key_exists("ReturnCall", $state)');
     assert('!array_key_exists("ReturnURL", $state) || !array_key_exists("ReturnCall", $state)');
     if (array_key_exists('ReturnURL', $state)) {
         /*
          * Save state information, and redirect to the URL specified
          * in $state['ReturnURL'].
          */
         $id = SimpleSAML_Auth_State::saveState($state, self::COMPLETED_STAGE);
         SimpleSAML_Utilities::redirectTrustedURL($state['ReturnURL'], array(self::AUTHPARAM => $id));
     } else {
         /* Pass the state to the function defined in $state['ReturnCall']. */
         /* We are done with the state array in the session. Delete it. */
         SimpleSAML_Auth_State::deleteState($state);
         $func = $state['ReturnCall'];
         assert('is_callable($func)');
         call_user_func($func, $state);
         assert(FALSE);
     }
 }
开发者ID:shirlei,项目名称:simplesaml,代码行数:45,代码来源:ProcessingChain.php

示例4: logout

 /**
  * Log out from this authentication source.
  *
  * This function should be overridden if the authentication source requires special
  * steps to complete a logout operation.
  *
  * If the logout process requires a redirect, the state should be saved. Once the
  * logout operation is completed, the state should be restored, and completeLogout
  * should be called with the state. If this operation can be completed without
  * showing the user a page, or redirecting, this function should return.
  *
  * @param array &$state  Information about the current logout operation.
  */
 public function logout(&$state)
 {
     assert('is_array($state)');
     $logoutUrl = $this->_casConfig['logout'];
     SimpleSAML_Auth_State::deleteState($state);
     // we want cas to log us out
     \SimpleSAML\Utils\HTTP::redirectTrustedURL($logoutUrl);
 }
开发者ID:tractorcow,项目名称:simplesamlphp,代码行数:21,代码来源:CAS.php


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