Definition at line 9 of file Store.php.
◆ __construct()
sspmod_consent_Store::__construct |
( |
& |
$config | ) |
|
|
protected |
Constructor for the base class.
This constructor should always be called first in any class which implements this class.
- Parameters
-
array | &$config | The configuration for this storage handler. |
Definition at line 18 of file Store.php.
References deleteConsent(), hasConsent(), and saveConsent().
20 assert(
'is_array($config)');
◆ deleteAllConsents()
sspmod_consent_Store::deleteAllConsents |
( |
|
$userId | ) |
|
Delete all consents.
Called when a user revokes all consents
- Parameters
-
string | $userId | The hash identifying the user at an IdP. |
- Returns
- mixed Should be the number of consent removed
- Exceptions
-
Definition at line 79 of file Store.php.
81 throw new Exception(
'Not implemented: deleteAllConsents()');
◆ deleteConsent()
sspmod_consent_Store::deleteConsent |
( |
|
$userId, |
|
|
|
$destinationId |
|
) |
| |
|
abstract |
Delete consent.
Called when a user revokes consent for a given destination.
- Parameters
-
string | $userId | The hash identifying the user at an IdP. |
string | $destinationId | A string which identifyes the destination. |
- Returns
- mixed Should be the number of consent deleted.
Referenced by __construct().
◆ getConsents()
sspmod_consent_Store::getConsents |
( |
|
$userId | ) |
|
|
abstract |
Retrieve consents.
This function should return a list of consents the user has saved.
- Parameters
-
string | $userId | The hash identifying the user at an IdP. |
- Returns
- array Array of all destination ids the user has given consent for.
Referenced by getStatistics().
◆ getStatistics()
sspmod_consent_Store::getStatistics |
( |
| ) |
|
Get statistics for all consent given in the consent store.
- Returns
- mixed Statistics from the consent store
- Exceptions
-
Definition at line 92 of file Store.php.
References getConsents().
94 throw new Exception(
'Not implemented: getStatistics()');
◆ hasConsent()
sspmod_consent_Store::hasConsent |
( |
|
$userId, |
|
|
|
$destinationId, |
|
|
|
$attributeSet |
|
) |
| |
|
abstract |
Check for consent.
This function checks whether a given user has authorized the release of the attributes identified by $attributeSet from $source to $destination.
- Parameters
-
string | $userId | The hash identifying the user at an IdP. |
string | $destinationId | A string which identifyes the destination. |
string | $attributeSet | A hash which identifies the attributes. |
- Returns
- bool True if the user has given consent earlier, false if not (or on error).
Referenced by __construct().
◆ parseStoreConfig()
static sspmod_consent_Store::parseStoreConfig |
( |
|
$config | ) |
|
|
static |
◆ saveConsent()
sspmod_consent_Store::saveConsent |
( |
|
$userId, |
|
|
|
$destinationId, |
|
|
|
$attributeSet |
|
) |
| |
|
abstract |
Save consent.
Called when the user asks for the consent to be saved. If consent information for the given user and destination already exists, it should be overwritten.
- Parameters
-
string | $userId | The hash identifying the user at an IdP. |
string | $destinationId | A string which identifyes the destination. |
string | $attributeSet | A hash which identifies the attributes. |
- Returns
- bool True if consent is succesfully saved otherwise false.
Referenced by __construct().
The documentation for this class was generated from the following file:
- libs/composer/vendor/simplesamlphp/simplesamlphp/modules/consent/lib/Store.php