75        $this->db = 
$GLOBALS[
'DIC']->database();
 
   76        $this->idp_id = $a_idp_id;
 
   78        if ($this->idp_id > 0) {
 
   90        if (count($idps) > 0) {
 
   91            return current($idps);
 
   94        require_once 
'Services/Saml/exceptions/class.ilSamlException.php';
 
   95        throw new \ilSamlException(
'No active SAML IDP found');
 
  104        if (!isset(self::$instances[$a_idp_id]) || !(self::$instances[$a_idp_id] instanceof 
self)) {
 
  105            self::$instances[$a_idp_id] = 
new self($a_idp_id);
 
  108        return self::$instances[$a_idp_id];
 
  116        $query = 
'SELECT * FROM saml_idp_settings WHERE idp_id = ' . $this->db->quote($this->
getIdpId(), 
'integer');
 
  118        while ($record = $this->db->fetchAssoc(
$res)) {
 
  123        throw new \ilException(
'Could not find idp');
 
  132            $this->
setIdpId((
int) $this->db->nextId(
'saml_idp_settings'));
 
  138                'idp_id' => array(
'integer', $this->
getIdpId())
 
  141                'is_active' => array(
'integer', $this->
isActive()),
 
  143                'uid_claim' => array(
'text', $this->
getUidClaim()),
 
  145                'entity_id' => array(
'text', $this->
getEntityId()),
 
  156    public function delete()
 
  158        require_once 
'Services/Authentication/classes/External/UserAttributeMapping/class.ilExternalAuthUserAttributeMapping.php';
 
  162        $this->db->manipulateF(
 
  163            'UPDATE usr_data SET auth_mode = %s WHERE auth_mode = %s',
 
  164            array(
'text', 
'text'),
 
  168        $this->db->manipulate(
'DELETE FROM saml_idp_settings WHERE idp_id = ' . $this->db->quote($this->getIdpId(), 
'integer'));
 
  194        $this->
setIdpId((
int) $record[
'idp_id']);
 
  195        $this->
setActive((
bool) $record[
'is_active']);
 
  231            $GLOBALS[
'DIC']->logger()->auth()->write(__METHOD__ . 
': No auth mode given..............');
 
  235        $auth_arr = explode(
'_', $a_auth_mode);
 
  236        return count($auth_arr) == 2 && $auth_arr[0] == 
AUTH_SAML && strlen($auth_arr[1]);
 
  245        if (self::isAuthModeSaml($a_auth_mode)) {
 
  246            $auth_arr = explode(
'_', $a_auth_mode);
 
  259        foreach (self::getAllIdps() as 
$idp) {
 
  261                return $idp->getIdpId();
 
  275        foreach (self::getAllIdps() as 
$idp) {
 
  276            if (
$idp->isActive()) {
 
  291        $res = 
$DIC->database()->query(
'SELECT * FROM saml_idp_settings');
 
  310        $auth_arr = explode(
'_', $a_auth_key);
 
  311        if (count((array) $auth_arr) > 1) {
 
  312            return 'saml_' . $auth_arr[1];
 
  324        $auth_arr = explode(
'_', $a_auth_mode);
 
  325        if (count((array) $auth_arr) > 1) {
 
  393        $this->allow_local_auth = (bool) $status;
 
  409        $this->default_role_id = (int) $role_id;
 
  417        $this->uid_claim = $claim;
 
  433        $this->login_claim = $claim;
 
  457        $this->sync_status = (bool) 
$sync;
 
  473        $this->account_migration_status = (int) $status;
 
$metadata['__DYNAMIC:1__']
An exception for terminatinating execution or to throw for unit testing.
Class ilExternalAuthUserAttributeMapping.
static getKeyByAuthMode($a_auth_mode)
static getActiveIdpList()
static getInstanceByIdpId($a_idp_id)
setDefaultRoleId($role_id)
setSynchronizationStatus($sync)
static geIdpIdByEntityId($entityId)
isAccountMigrationEnabled()
setAccountMigrationStatus($status)
setLocalLocalAuthenticationStatus($status)
static getIdpIdByAuthMode($a_auth_mode)
static getFirstActiveIdp()
$account_migration_status
isSynchronizationEnabled()
static getAuthModeByKey($a_auth_key)
static isAuthModeSaml($a_auth_mode)
allowLocalAuthentication()
bindDbRecord(array $record)
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
if(isset($_POST['submit'])) $form
foreach($_POST as $key=> $value) $res