PHP Класс sspmod_consent_Store, simplesamlphp

Автор: Olav Morken ([email protected])
Автор: JAcob Christiansen ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
deleteAllConsents ( string $userId ) : mixed Delete all consents.
deleteConsent ( string $userId, string $destinationId ) : mixed Delete consent.
getConsents ( string $userId ) : array Retrieve consents.
getStatistics ( ) : mixed Get statistics for all consent given in the consent store
hasConsent ( string $userId, string $destinationId, string $attributeSet ) : boolean Check for consent.
parseStoreConfig ( mixed $config ) : sspmod_consent_Store Parse consent storage configuration.
saveConsent ( string $userId, string $destinationId, string $attributeSet ) : boolean Save consent.

Защищенные методы

Метод Описание
__construct ( &$config ) Constructor for the base class.

Описание методов

__construct() защищенный Метод

This constructor should always be called first in any class which implements this class.
protected __construct ( &$config )

deleteAllConsents() публичный Метод

Called when a user revokes all consents
public deleteAllConsents ( string $userId ) : mixed
$userId string The hash identifying the user at an IdP.
Результат mixed Should be the number of consent removed

deleteConsent() абстрактный публичный Метод

Called when a user revokes consent for a given destination.
abstract public deleteConsent ( string $userId, string $destinationId ) : mixed
$userId string The hash identifying the user at an IdP.
$destinationId string A string which identifyes the destination.
Результат mixed Should be the number of consent deleted.

getConsents() абстрактный публичный Метод

This function should return a list of consents the user has saved.
abstract public getConsents ( string $userId ) : array
$userId string The hash identifying the user at an IdP.
Результат array Array of all destination ids the user has given consent for.

getStatistics() публичный Метод

Get statistics for all consent given in the consent store
public getStatistics ( ) : mixed
Результат mixed Statistics from the consent store

hasConsent() абстрактный публичный Метод

This function checks whether a given user has authorized the release of the attributes identified by $attributeSet from $source to $destination.
abstract public hasConsent ( string $userId, string $destinationId, string $attributeSet ) : boolean
$userId string The hash identifying the user at an IdP.
$destinationId string A string which identifyes the destination.
$attributeSet string A hash which identifies the attributes.
Результат boolean True if the user has given consent earlier, false if not (or on error).

parseStoreConfig() публичный статический Метод

This function parses the configuration for a consent storage method. An exception will be thrown if configuration parsing fails.
public static parseStoreConfig ( mixed $config ) : sspmod_consent_Store
$config mixed The configuration.
Результат sspmod_consent_Store An object which implements the sspmod_consent_Store class.

saveConsent() абстрактный публичный Метод

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.
abstract public saveConsent ( string $userId, string $destinationId, string $attributeSet ) : boolean
$userId string The hash identifying the user at an IdP.
$destinationId string A string which identifyes the destination.
$attributeSet string A hash which identifies the attributes.
Результат boolean True if consent is succesfully saved otherwise false.