|
static | add ($idpEntityId, $spEntityId, $user, $value) |
| Add a NameID into the database. More...
|
|
static | get ($idpEntityId, $spEntityId, $user) |
| Retrieve a NameID into from database. More...
|
|
static | delete ($idpEntityId, $spEntityId, $user) |
| Delete a NameID from the database. More...
|
|
static | getIdentities ($idpEntityId, $spEntityId) |
| Retrieve all federated identities for an IdP-SP pair. More...
|
|
Definition at line 8 of file SQLNameID.php.
◆ add()
static sspmod_saml_IdP_SQLNameID::add |
( |
|
$idpEntityId, |
|
|
|
$spEntityId, |
|
|
|
$user, |
|
|
|
$value |
|
) |
| |
|
static |
Add a NameID into the database.
- Parameters
-
\SimpleSAML\Store\SQL | $store | The data store. |
string | $idpEntityId | The IdP entityID. |
string | $spEntityId | The SP entityID. |
string | $user | The user's unique identificator (e.g. username). |
string | $value | The NameID value. |
Definition at line 66 of file SQLNameID.php.
References $idpEntityId, $params, $query, $spEntityId, $store, and array.
Referenced by sspmod_saml_Auth_Process_SQLPersistentNameID\getValue().
67 assert(
'is_string($idpEntityId)');
68 assert(
'is_string($spEntityId)');
69 assert(
'is_string($user)');
70 assert(
'is_string($value)');
81 $query =
'INSERT INTO ' .
$store->prefix .
'_saml_PersistentNameID (_idp, _sp, _user, _value) VALUES(:_idp, :_sp, :_user, :_value)';
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
Create styles array
The data for the language used.
◆ createTable()
Create NameID table in SQL, if it is missing.
- Parameters
-
\SimpleSAML\Store\SQL | $store | The datastore. |
Definition at line 15 of file SQLNameID.php.
References $query.
17 if (
$store->getTableVersion(
'saml_PersistentNameID') === 1) {
21 $query =
'CREATE TABLE ' .
$store->prefix .
'_saml_PersistentNameID ( 22 _idp VARCHAR(256) NOT NULL, 23 _sp VARCHAR(256) NOT NULL, 24 _user VARCHAR(256) NOT NULL, 25 _value VARCHAR(40) NOT NULL, 26 UNIQUE (_idp, _sp, _user) 30 $query =
'CREATE INDEX ' .
$store->prefix .
'_saml_PersistentNameID_idp_sp ON ' .
$store->prefix .
'_saml_PersistentNameID (_idp, _sp)';
33 $store->setTableVersion(
'saml_PersistentNameID', 1);
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
◆ delete()
static sspmod_saml_IdP_SQLNameID::delete |
( |
|
$idpEntityId, |
|
|
|
$spEntityId, |
|
|
|
$user |
|
) |
| |
|
static |
Delete a NameID from the database.
- Parameters
-
string | $idpEntityId | The IdP entityID. |
string | $spEntityId | The SP entityID. |
string | $user | The user's unique identificator (e.g. username). |
Definition at line 129 of file SQLNameID.php.
References $idpEntityId, $params, $query, $store, and array.
130 assert(
'is_string($idpEntityId)');
131 assert(
'is_string($spEntityId)');
132 assert(
'is_string($user)');
134 $store = self::getStore();
142 $query =
'DELETE FROM ' .
$store->prefix .
'_saml_PersistentNameID WHERE _idp = :_idp AND _sp = :_sp AND _user = :_user';
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
Create styles array
The data for the language used.
◆ get()
static sspmod_saml_IdP_SQLNameID::get |
( |
|
$idpEntityId, |
|
|
|
$spEntityId, |
|
|
|
$user |
|
) |
| |
|
static |
Retrieve a NameID into from database.
- Parameters
-
string | $idpEntityId | The IdP entityID. |
string | $spEntityId | The SP entityID. |
string | $user | The user's unique identificator (e.g. username). |
- Returns
- string|NULL $value The NameID value, or NULL of no NameID value was found.
Definition at line 95 of file SQLNameID.php.
References $idpEntityId, $params, $query, $row, $store, and array.
Referenced by sspmod_saml_Auth_Process_SQLPersistentNameID\getValue().
96 assert(
'is_string($idpEntityId)');
97 assert(
'is_string($spEntityId)');
98 assert(
'is_string($user)');
100 $store = self::getStore();
108 $query =
'SELECT _value FROM ' .
$store->prefix .
'_saml_PersistentNameID WHERE _idp = :_idp AND _sp = :_sp AND _user = :_user';
113 if (
$row === FALSE) {
118 return $row[
'_value'];
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
Create styles array
The data for the language used.
◆ getIdentities()
static sspmod_saml_IdP_SQLNameID::getIdentities |
( |
|
$idpEntityId, |
|
|
|
$spEntityId |
|
) |
| |
|
static |
Retrieve all federated identities for an IdP-SP pair.
- Parameters
-
string | $idpEntityId | The IdP entityID. |
string | $spEntityId | The SP entityID. |
- Returns
- array Array of userid => NameID.
Definition at line 155 of file SQLNameID.php.
References $idpEntityId, $params, $query, $res, $row, $store, and array.
156 assert(
'is_string($idpEntityId)');
157 assert(
'is_string($spEntityId)');
159 $store = self::getStore();
166 $query =
'SELECT _user, _value FROM ' .
$store->prefix .
'_saml_PersistentNameID WHERE _idp = :_idp AND _sp = :_sp';
171 while ( (
$row =
$query->fetch(PDO::FETCH_ASSOC)) !== FALSE) {
172 $res[
$row[
'_user']] = $row[
'_value'];
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
◆ getStore()
static sspmod_saml_IdP_SQLNameID::getStore |
( |
| ) |
|
|
staticprivate |
Retrieve the SQL datastore.
Will also ensure that the NameID table is present.
- Returns
- SQL datastore.
Definition at line 44 of file SQLNameID.php.
References $store, and SimpleSAML\Store\getInstance().
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
Attribute-related utility methods.
static getInstance()
Retrieve our singleton instance.
The documentation for this class was generated from the following file:
- libs/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/lib/IdP/SQLNameID.php