PHP Класс sspmod_consent_Auth_Process_Consent, simplesamlphp

The initial focus of the consent form can be set by setting the 'focus'-attribute to either 'yes' or 'no'. Different storage backends can be configured by setting the 'store'-attribute. The'store'-attribute is on the form :, and refers to the class sspmod__Consent_Store_. For examples, see the built-in modules 'consent:Cookie' and 'consent:Database', which can be found under modules/consent/lib/Consent/Store. Example - minimal: 'authproc' => array( 'consent:Consent', ), Example - save in cookie: 'authproc' => array( array( 'consent:Consent', 'store' => 'consent:Cookie', ), Example - save in MySQL database: 'authproc' => array( array( 'consent:Consent', 'store' => array( 'consent:Database', 'dsn' => 'mysql:host=db.example.org;dbname=simplesaml', 'username' => 'simplesaml', 'password' => 'secretpassword', ), ), ), Example - initial focus on yes-button: 'authproc' => array( array('consent:Consent', 'focus' => 'yes'), ),
Наследование: extends SimpleSAML_Auth_ProcessingFilter
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( array $config, mixed $reserved ) Initialize consent filter.
getAttributeHash ( string $attributes, boolean $includeValues = false ) : string Generate unique identifier for attributes.
getHashedUserID ( string $userid, string $source ) : string Generate a unique identifier of the user.
getTargetedID ( string $userid, string $source, string $destination ) : string Generate a unique targeted identifier.
process ( &$state ) : void Process a authentication response

Приватные методы

Метод Описание
checkDisable ( mixed $option, string $entityId ) : boolean Helper function to check whether consent is disabled.

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

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

Validates and parses the configuration.
public __construct ( array $config, mixed $reserved )
$config array Configuration information.
$reserved mixed For future use.

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

Create a hash value for the attributes that changes when attributes are added or removed. If the attribute values are included in the hash, the hash will change if the values change.
public static getAttributeHash ( string $attributes, boolean $includeValues = false ) : string
$attributes string The attributes.
$includeValues boolean Whether or not to include the attribute value in the generation of the hash.
Результат string SHA1 of the user id, source id, destination id and salt.

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

Generate a unique identifier of the user.
public static getHashedUserID ( string $userid, string $source ) : string
$userid string The user id.
$source string The source id.
Результат string SHA1 of the user id, source id and salt.

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

Generate a unique targeted identifier.
public static getTargetedID ( string $userid, string $source, string $destination ) : string
$userid string The user id.
$source string The source id.
$destination string The destination id.
Результат string SHA1 of the user id, source id, destination id and salt.

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

This function saves the state, and redirects the user to the page where the user can authorize the release of the attributes. If storage is used and the consent has already been given the user is passed on.
public process ( &$state ) : void
Результат void