XSL file to convert HTML to tomboy markup
[grauphel.git] / lib / token.php
1 <?php
2 /**
3  * Part of grauphel
4  *
5  * PHP version 5
6  *
7  * @category  Tools
8  * @package   Grauphel
9  * @author    Christian Weiske <cweiske@cweiske.de>
10  * @copyright 2014 Christian Weiske
11  * @license   http://www.gnu.org/licenses/agpl.html GNU AGPL v3
12  * @link      http://cweiske.de/grauphel.htm
13  */
14 namespace OCA\Grauphel\Lib;
15
16 /**
17  * OAuth token with some additional data
18  *
19  * @category  Tools
20  * @package   Grauphel
21  * @author    Christian Weiske <cweiske@cweiske.de>
22  * @copyright 2014 Christian Weiske
23  * @license   http://www.gnu.org/licenses/agpl.html GNU AGPL v3
24  * @version   Release: @package_version@
25  * @link      http://cweiske.de/grauphel.htm
26  */
27 class Token
28 {
29     /**
30      * One of: temp, access, verify
31      *
32      * @var string
33      */
34     public $type;
35
36     /**
37      * Actual random token string
38      *
39      * @var string
40      */
41     public $tokenKey;
42
43     /**
44      * Matching secret for the token string
45      *
46      * @var string
47      */
48     public $secret;
49
50     /**
51      * User name for which the token is valid
52      *
53      * @var string
54      */
55     public $user;
56
57     /**
58      * Verification string.
59      * Only used when $type == 'verify'
60      *
61      * @var string
62      */
63     public $verifier;
64
65     /**
66      * Callback URL for temp tokens
67      *
68      * @var string
69      */
70     public $callback;
71
72     /**
73      * Client name/identifier (user agent)
74      *
75      * @var string
76      */
77     public $client;
78
79     /**
80      * Unix timestamp when the token was used last
81      *
82      * @var integer
83      */
84     public $lastuse;
85
86     public function __construct($type = null)
87     {
88         $this->type = $type;
89     }
90 }
91 ?>