17                throw new Exception(
'User ID is missing');
 
   25        if (!isset($entry[
'owner']))
 
   26                throw new Exception(
'OAuth Consumer has no owner. Which means no one is granted access, not even you.');
 
   27        if ($entry[
'owner'] !== 
$userid) 
 
   28                throw new Exception(
'OAuth Consumer has an owner that is not equal to your userid, hence you are not granted access.');
 
   32if (isset($_REQUEST[
'delete'])) {
 
   33        $entryc = 
$store->get(
'consumers', $_REQUEST[
'delete'], 
'');
 
   34        $entry = $entryc[
'value'];
 
   37        $store->remove(
'consumers', $entry[
'key'], 
'');
 
   43$slist = array(
'mine' => array(), 
'others' => array());
 
   45foreach(
$list AS $listitem) {
 
   46        if (array_key_exists(
'owner', $listitem[
'value'])) {
 
   47                if ($listitem[
'value'][
'owner'] === 
$userid) {
 
   48                        $slist[
'mine'][] = $listitem; 
continue;
 
   51        $slist[
'others'][] = $listitem;
 
An exception for terminatinating execution or to throw for unit testing.
static getById($authId, $type=null)
Retrieve authentication source.
static getOptionalConfig($filename='config.php', $configSet='simplesaml')
Load a configuration file from a configuration set.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
static getSessionFromRequest()
Retrieves the current session.
if(empty($userids)) $userid
Attribute-related utility methods.
if(isset($_REQUEST['delete'])) $list
requireOwnership($entry, $userid)
if(is_array($list)) foreach($list AS $listitem) $template