function _simplesamlphp_auth_get_authname in simpleSAMLphp Authentication 7.2
Same name and namespace in other branches
- 6.3 simplesamlphp_auth.module \_simplesamlphp_auth_get_authname()
- 6.2 simplesamlphp_auth.module \_simplesamlphp_auth_get_authname()
- 7.3 simplesamlphp_auth.module \_simplesamlphp_auth_get_authname()
- 7 simplesamlphp_auth.module \_simplesamlphp_auth_get_authname()
Gets the authname attribute from the SAML assertion.
Return value
string The authname attribute.
1 call to _simplesamlphp_auth_get_authname()
- simplesamlphp_auth_init in ./
simplesamlphp_auth.module - Implements hook_init().
File
- ./
simplesamlphp_auth.module, line 586 - simpleSAMLphp authentication module for Drupal.
Code
function _simplesamlphp_auth_get_authname() {
global $_simplesamlphp_auth_saml_attributes;
$authname = '';
// Check if valid local session exists..
if (isset($_simplesamlphp_auth_saml_attributes)) {
_simplesaml_auth_debug(t('_simplesamlphp_auth_get_authname: Valid local session exist'));
if (isset($_simplesamlphp_auth_saml_attributes[variable_get('simplesamlphp_auth_unique_id', 'eduPersonPrincipalName')])) {
$authname = $_simplesamlphp_auth_saml_attributes[variable_get('simplesamlphp_auth_unique_id', 'eduPersonPrincipalName')][0];
}
else {
throw new Exception(t('error in simplesamlphp_auth.module: no valid unique id attribute set'));
}
}
return $authname;
}