40 preg_match(self::ATTR_REGEX, $this->rule->getExternalAttribute(), $matches);
42 if (is_array($matches) && isset($matches[3]) && is_numeric($matches[3])) {
43 $index = (int) $matches[3];
57 preg_match(self::ATTR_REGEX, $this->rule->getExternalAttribute(), $matches);
59 if (is_array($matches) && isset($matches[1]) && is_string($matches[1])) {
60 $attribute = $matches[1];
74 if (!array_key_exists($attributeKey, $this->userData)) {
75 throw new \ilSamlException(sprintf(
76 "Configured external attribute of mapping '%s' -> '%s' does not exist in SAML attribute data.",
77 $this->rule->getAttribute(),
78 $this->rule->getExternalAttribute()
82 $value = $this->userData[$attributeKey];
84 if (is_array($value)) {
87 if (!array_key_exists($valueIndex, $value)) {
88 throw new \ilSamlException(sprintf(
89 "Configured external attribute of mapping '%s' -> '%s' does not exist in SAML attribute data.",
90 $this->rule->getAttribute(),
91 $this->rule->getExternalAttribute()
95 $value = $value[$valueIndex];
98 if (!is_scalar($value)) {
99 throw new \ilSamlException(sprintf(
100 "Could not parse a scalar value based on the user attribute mapping '%s' -> '%s'.",
101 $this->rule->getAttribute(),
102 $this->rule->getExternalAttribute()
__construct(\ilExternalAuthUserAttributeMappingRule $rule, array $userData)
ilSamlMappedUserAttributeValueParser constructor.
Class ilExternalAuthUserAttributeMappingRule.
Create styles array
The data for the language used.
Class ilSamlMappedUserAttributeValueParser.