1 | <?php |
||
12 | class SecurityToken |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $secret = null; |
||
18 | |||
19 | /** |
||
20 | * @param Comment $comment Comment to generate this token for |
||
21 | */ |
||
22 | public function __construct($comment) |
||
30 | |||
31 | /** |
||
32 | * Generate the token for the given salt and current secret |
||
33 | * |
||
34 | * @param string $salt |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | protected function getToken($salt) |
||
42 | |||
43 | /** |
||
44 | * Get the member-specific salt. |
||
45 | * |
||
46 | * The reason for making the salt specific to a user is that it cannot be "passed in" via a |
||
47 | * querystring, requiring the same user to be present at both the link generation and the |
||
48 | * controller action. |
||
49 | * |
||
50 | * @param string $salt Single use salt |
||
51 | * @param Member $member Member object |
||
52 | * |
||
53 | * @return string Generated salt specific to this member |
||
54 | */ |
||
55 | protected function memberSalt($salt, $member) |
||
60 | |||
61 | /** |
||
62 | * @param string $url Comment action URL |
||
63 | * @param Member $member Member to restrict access to this action to |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | public function addToUrl($url, $member) |
||
82 | |||
83 | /** |
||
84 | * @param SS_HTTPRequest $request |
||
85 | * |
||
86 | * @return boolean |
||
87 | */ |
||
88 | public function checkRequest($request) |
||
102 | |||
103 | |||
104 | /** |
||
105 | * Generates new random key |
||
106 | * |
||
107 | * @param integer $length |
||
108 | * |
||
109 | * @return string |
||
110 | */ |
||
111 | protected function generate($length = null) |
||
120 | } |
||
121 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.