ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
ConsumerNonce.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
IMSGlobal\LTI\ToolProvider
;
4
14
class
ConsumerNonce
15
{
16
20
const
MAX_NONCE_AGE
= 30;
// in minutes
21
27
public
$expires
= null;
28
34
private
$consumer
= null;
40
private
$value
= null;
41
48
public
function
__construct
(
$consumer
,
$value
= null)
49
{
50
51
$this->consumer =
$consumer
;
52
$this->value =
$value
;
53
$this->expires = time() + (self::MAX_NONCE_AGE * 60);
54
55
}
56
62
public
function
load
()
63
{
64
65
return
$this->consumer->getDataConnector()->loadConsumerNonce($this);
66
67
}
68
74
public
function
save
()
75
{
76
77
return
$this->consumer->getDataConnector()->saveConsumerNonce($this);
78
79
}
80
86
public
function
getConsumer
()
87
{
88
89
return
$this->consumer
;
90
91
}
92
98
public
function
getValue
()
99
{
100
101
return
$this->value
;
102
103
}
104
105
}
IMSGlobal\LTI\ToolProvider\ConsumerNonce
Class to represent a tool consumer nonce.
Definition:
ConsumerNonce.php:14
IMSGlobal\LTI\ToolProvider\ConsumerNonce\$consumer
$consumer
Tool Consumer to which this nonce applies.
Definition:
ConsumerNonce.php:34
IMSGlobal\LTI\ToolProvider\ConsumerNonce\MAX_NONCE_AGE
const MAX_NONCE_AGE
Maximum age nonce values will be retained for (in minutes).
Definition:
ConsumerNonce.php:20
IMSGlobal\LTI\ToolProvider\ConsumerNonce\$expires
$expires
Date/time when the nonce value expires.
Definition:
ConsumerNonce.php:27
IMSGlobal\LTI\ToolProvider\ConsumerNonce\$value
$value
Nonce value.
Definition:
ConsumerNonce.php:40
IMSGlobal\LTI\ToolProvider\ConsumerNonce\getConsumer
getConsumer()
Get tool consumer.
Definition:
ConsumerNonce.php:86
IMSGlobal\LTI\ToolProvider\ConsumerNonce\save
save()
Save a nonce value in the database.
Definition:
ConsumerNonce.php:74
IMSGlobal\LTI\ToolProvider\ConsumerNonce\getValue
getValue()
Get outcome value.
Definition:
ConsumerNonce.php:98
IMSGlobal\LTI\ToolProvider\ConsumerNonce\__construct
__construct($consumer, $value=null)
Class constructor.
Definition:
ConsumerNonce.php:48
php
IMSGlobal\LTI\ToolProvider\ConsumerNonce\load
load()
Load a nonce value from the database.
Definition:
ConsumerNonce.php:62
IMSGlobal\LTI\ToolProvider
Definition:
ConsumerNonce.php:3
libs
composer
vendor
imsglobal
lti
src
ToolProvider
ConsumerNonce.php
Generated on Thu Jan 16 2025 19:01:41 for ILIAS by
1.8.13 (using
Doxyfile
)