ILIAS  release_8 Revision v8.24
TrivialOAuthDataStore.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
9{
10 private array $consumers = array();
11
12 public function add_consumer($consumer_key, $consumer_secret): void
13 {
14 $this->consumers[$consumer_key] = $consumer_secret;
15 }
16
17 public function lookup_consumer($consumer_key): ?ILIAS\LTIOAuth\OAuthConsumer
18 {
19 if (strpos($consumer_key, "http://") === 0) {
20 return new \ILIAS\LTIOAuth\OAuthConsumer($consumer_key, "secret", null);
21 }
22 if ($this->consumers[$consumer_key]) {
23 return new \ILIAS\LTIOAuth\OAuthConsumer($consumer_key, $this->consumers[$consumer_key], null);
24 }
25 return null;
26 }
27
28 public function lookup_token($consumer, $token_type, $token): \OAuthToken
29 {
30 return new OAuthToken($consumer, "");
31 }
32
33 // Return NULL if the nonce has not been used
34 // Return $nonce if the nonce was previously used
35 public function lookup_nonce($consumer, $token, $nonce, $timestamp)
36 {
37 // Should add some clever logic to keep nonces from
38 // being reused - for no we are really trusting
39 // that the timestamp will save us
40 return null;
41 }
42
43 public function new_request_token($consumer, $callback = null)
44 {
45 return null;
46 }
47
48 public function new_access_token($token, $consumer, $verifier = null)
49 {
50 return null;
51 }
52}
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:70
A Trivial memory-based store - no support for tokens.
new_access_token($token, $consumer, $verifier=null)
new_request_token($consumer, $callback=null)
add_consumer($consumer_key, $consumer_secret)
lookup_nonce($consumer, $token, $nonce, $timestamp)
lookup_token($consumer, $token_type, $token)
Class ChatMainBarProvider \MainMenu\Provider.
$token
Definition: xapitoken.php:70