Revision: 2172
Author: olavmrk
Date: Thu Feb 11 05:46:15 2010
Log: IdP iframe logout: Statistics for logout.
http://code.google.com/p/simplesamlphp/source/detail?r=2172

Modified:
 /trunk/modules/core/www/idp/logout-iframe-done.php
 /trunk/modules/core/www/idp/logout-iframe.php
 /trunk/modules/statistics/config-templates/module_statistics.php

=======================================
--- /trunk/modules/core/www/idp/logout-iframe-done.php Wed Jan 27 01:26:23 2010 +++ /trunk/modules/core/www/idp/logout-iframe-done.php Thu Feb 11 05:46:15 2010
@@ -9,7 +9,16 @@
 $idp = SimpleSAML_IdP::getByState($state);

 $associations = $idp->getAssociations();
-$SPs = $state['core:Logout-IFrame:Associations'];
+
+if (!isset($_REQUEST['cancel'])) {
+       SimpleSAML_Logger::stats('slo-iframe done');
+       $SPs = $state['core:Logout-IFrame:Associations'];
+} else {
+       /* User skipped global logout. */
+       SimpleSAML_Logger::stats('slo-iframe skip');
+       $SPs = array(); /* No SPs should have been logged out. */
+       $state['core:Failed'] = TRUE; /* Mark as partial logout. */
+}

 $globalConfig = SimpleSAML_Configuration::getInstance();
 $cookiePath = '/' . $globalConfig->getBaseURL();
@@ -42,6 +51,12 @@
                $idp->terminateAssociation($assocId);
        } else {
SimpleSAML_Logger::warning('Unable to terminate association with ' . var_export($assocId, TRUE) . '.');
+               if (isset($sp['saml:entityID'])) {
+                       $spId = $sp['saml:entityID'];
+               } else {
+                       $spId = $assocId;
+               }
+               SimpleSAML_Logger::stats('slo-iframe-fail ' . $spId);
                $state['core:Failed'] = TRUE;
        }

=======================================
--- /trunk/modules/core/www/idp/logout-iframe.php       Wed Jan 27 01:26:23 2010
+++ /trunk/modules/core/www/idp/logout-iframe.php       Thu Feb 11 05:46:15 2010
@@ -19,6 +19,10 @@
 } else {
        $timeout = time() + 10;
 }
+
+if ($type !== 'embed' && $type !== 'async') {
+       SimpleSAML_Logger::stats('slo-iframe ' . $type);
+}

 $state = SimpleSAML_Auth_State::loadState($id, 'core:Logout-IFrame');
 $idp = SimpleSAML_IdP::getByState($state);
=======================================
--- /trunk/modules/statistics/config-templates/module_statistics.php Tue Dec 1 01:29:21 2009 +++ /trunk/modules/statistics/config-templates/module_statistics.php Thu Feb 11 05:46:15 2010
@@ -216,6 +216,22 @@
                                'config' => 'saml20-sp-remote',
                        ),
                ),
+               'slopages' => array(
+                       'name'          => 'SLO iframe pages',
+                       'descr'         => 'The varioust IFrame SLO pages a 
user visits',
+                       'action'        => 'slo-iframe',
+                       'col'           => 6,                                // 
Page the user visits.
+               ),
+               'slofail' => array(
+                       'name'          => 'Failed iframe IdP-init SLOs',
+                       'descr'         => 'The number of logout failures from 
various SPs',
+                       'action'        => 'slo-iframe-fail',
+                       'col'           => 6,                                // 
Service Provider EntityID that wasn't logged out.
+                       'fieldPresentation' => array(
+                               'class' => 'statistics:Entity',
+                               'config' => 'saml20-sp-remote',
+                       ),
+               ),
        ),

 );

--
You received this message because you are subscribed to the Google Groups 
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simplesamlphp-commits?hl=en.

Reply via email to