PHP Class 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'), ),
Inheritance: extends SimpleSAML_Auth_ProcessingFilter
Afficher le fichier Open project: simplesamlphp/simplesamlphp Class Usage Examples

Méthodes publiques

Méthode Description
__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

Private Methods

Méthode Description
checkDisable ( mixed $option, string $entityId ) : boolean Helper function to check whether consent is disabled.

Method Details

__construct() public méthode

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

getAttributeHash() public static méthode

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.
Résultat string SHA1 of the user id, source id, destination id and salt.

getHashedUserID() public static méthode

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.
Résultat string SHA1 of the user id, source id and salt.

getTargetedID() public static méthode

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.
Résultat string SHA1 of the user id, source id, destination id and salt.

process() public méthode

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
Résultat void