aboutsummaryrefslogtreecommitdiff
path: root/lib/token.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/token.php')
-rw-r--r--lib/token.php77
1 files changed, 77 insertions, 0 deletions
diff --git a/lib/token.php b/lib/token.php
new file mode 100644
index 0000000..ebb0783
--- /dev/null
+++ b/lib/token.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Part of grauphel
+ *
+ * PHP version 5
+ *
+ * @category Tools
+ * @package Grauphel
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @copyright 2014 Christian Weiske
+ * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3
+ * @link http://cweiske.de/grauphel.htm
+ */
+namespace OCA\Grauphel\Lib;
+
+/**
+ * OAuth token with some additional data
+ *
+ * @category Tools
+ * @package Grauphel
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @copyright 2014 Christian Weiske
+ * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3
+ * @version Release: @package_version@
+ * @link http://cweiske.de/grauphel.htm
+ */
+class Token
+{
+ /**
+ * One of: temp, access, verify
+ *
+ * @var string
+ */
+ public $type;
+
+ /**
+ * Actual random token string
+ *
+ * @var string
+ */
+ public $tokenKey;
+
+ /**
+ * Matching secret for the token string
+ *
+ * @var string
+ */
+ public $secret;
+
+ /**
+ * User name for which the token is valid
+ *
+ * @var string
+ */
+ public $user;
+
+ /**
+ * Verification string.
+ * Only used when $type == 'verify'
+ *
+ * @var string
+ */
+ public $verifier;
+
+ /**
+ * Callback URL for temp tokens
+ *
+ * @var string
+ */
+ public $callback;
+
+ public function __construct($type = null)
+ {
+ $this->type = $type;
+ }
+}
+?>