implement authentication
[phancap.git] / src / phancap / Options.php
index ee129e8ee9e15fc827712c19c3c79d991a818e60..ddc9bdd86301f7a9741e2a6ae7c23000d484121f 100644 (file)
@@ -54,6 +54,24 @@ class Options
             'default' => 'screen',
             'type'    => array('screen', 'page'),
         ),
+        /**
+         * Authentication
+         */
+        'atimestamp' => array(
+            'title'   => 'Timestamp the request has been generated',
+            'default' => null,
+            'type'    => 'skip',
+        ),
+        'atoken' => array(
+            'title'   => 'Access token (user name)',
+            'default' => null,
+            'type'    => 'skip',
+        ),
+        'asignature' => array(
+            'title'   => 'Access signature',
+            'default' => null,
+            'type'    => 'skip',
+        ),
     );
 
     public $values = array();
@@ -88,7 +106,7 @@ class Options
                 $this->values[$name] = $this->validateArray(
                     $arValues[$name], $arOption['type']
                 );
-            } else {
+            } else if ($arOption['type'] != 'skip') {
                 throw new \InvalidArgumentException(
                     'Unsupported option type: ' . $arOption['type']
                 );