ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
OAuthDataStore.php
Go to the documentation of this file.
1<?php
2
4
6
17{
18
24 private $toolProvider = null;
25
31 public function __construct($toolProvider)
32 {
33
34 $this->toolProvider = $toolProvider;
35
36 }
37
45 function lookup_consumer($consumerKey)
46 {
47
48 return new OAuth\OAuthConsumer($this->toolProvider->consumer->getKey(),
49 $this->toolProvider->consumer->secret);
50
51 }
52
62 function lookup_token($consumer, $tokenType, $token)
63 {
64
65 return new OAuth\OAuthToken($consumer, '');
66
67 }
68
79 function lookup_nonce($consumer, $token, $value, $timestamp)
80 {
81
82 $nonce = new ConsumerNonce($this->toolProvider->consumer, $value);
83 $ok = !$nonce->load();
84 if ($ok) {
85 $ok = $nonce->save();
86 }
87 if (!$ok) {
88 $this->toolProvider->reason = 'Invalid nonce.';
89 }
90
91 return !$ok;
92
93 }
94
103 function new_request_token($consumer, $callback = null)
104 {
105
106 return null;
107
108 }
109
119 function new_access_token($token, $consumer, $verifier = null)
120 {
121
122 return null;
123
124 }
125
126}
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:81
An exception for terminatinating execution or to throw for unit testing.
Class to represent an OAuth Consumer.
Class to represent an OAuth Data Store.
Class to represent an OAuth Token.
Definition: OAuthToken.php:12
Class to represent a tool consumer nonce.
lookup_token($consumer, $tokenType, $token)
Create an OAuthToken object for the tool consumer.
new_request_token($consumer, $callback=null)
Get new request token.
lookup_consumer($consumerKey)
Create an OAuthConsumer object for the tool consumer.
lookup_nonce($consumer, $token, $value, $timestamp)
Lookup nonce value for the tool consumer.
__construct($toolProvider)
Class constructor.
new_access_token($token, $consumer, $verifier=null)
Get new access token.