PHP 클래스 sspmod_consent_Store, simplesamlphp

저자: Olav Morken ([email protected])
저자: JAcob Christiansen ([email protected])
파일 보기 프로젝트 열기: simplesamlphp/simplesamlphp 1 사용 예제들

공개 메소드들

메소드 설명
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.