Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
15a1c55d
Commit
15a1c55d
authored
5 years ago
by
Thijs Kinkhorst
Browse files
Options
Downloads
Patches
Plain Diff
attributealter: Make documentation a little bit more explicit and improve formatting
The testsuite already confirms this behaviour.
parent
fc57298d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/core/docs/authproc_attributealter.md
+35
-31
35 additions, 31 deletions
modules/core/docs/authproc_attributealter.md
with
35 additions
and
31 deletions
modules/core/docs/authproc_attributealter.md
+
35
−
31
View file @
15a1c55d
...
...
@@ -31,12 +31,12 @@ Parameters
This parameter is OPTIONAL, and if not set,
`subject`
is used as
`target`
.
`%replace`
: Indicates that the whole value of the attribute should be replaced
,
i
nstead of just the
match
.
This parameter is OPTIONAL.
: Indicates that the whole value of the attribute should be replaced i
f there is a
match
,
instead of just the match. If there's no match, the value will not be changed.
This parameter is OPTIONAL.
`%remove`
: Indicates that the whole value of the attribute should be removed completely
. If no other values exist, the
attribute will be removed completely.
: Indicates that the whole value of the attribute should be removed completely
if there is a match.
If no other values exist, the
attribute will be removed completely.
This parameter is OPTIONAL.
Examples
...
...
@@ -44,88 +44,92 @@ Examples
Change the domain on the
`mail`
attribute (when both the new and old domain are known):
10 =>
array(
10 =>
[
'class' => 'core:AttributeAlter',
'subject' => 'mail',
'pattern' => '/olddomain.com/',
'replacement' => 'newdomain.com',
)
,
]
,
Change the domain on the
`mail`
attribute (when new domain is known):
10 =>
array(
'class' => 'core:AttributeAlter',
'subject' => 'mail',
'pattern' => '/(?:[A-Za-z0-9-]+\.)+[A-Za-z]{2,6}$/',
'replacement' => 'newdomain.com',
)
,
10 =>
[
'class' => 'core:AttributeAlter',
'subject' => 'mail',
'pattern' => '/(?:[A-Za-z0-9-]+\.)+[A-Za-z]{2,6}$/',
'replacement' => 'newdomain.com',
]
,
Set the eduPersonPrimaryAffiliation based on users distinguishedName:
Set the eduPersonPrimaryAffiliation based on users
'
distinguishedName:
10 =>
array(
10 =>
[
'class' => 'core:AttributeAlter',
'subject' => 'dn',
'pattern' => '/OU=Staff/',
'replacement' => 'staff',
'target' => 'eduPersonPrimaryAffiliation',
)
,
]
,
Normalize the eduPersonPrimaryAffiliation:
10 =>
array(
10 =>
[
'class' => 'core:AttributeAlter',
'subject' => 'eduPersonPrimaryAffiliation',
'pattern' => '/Student in school/',
'replacement' => 'student',
'%replace',
)
,
]
,
Get the domain of the email and put it in a separate attribute:
Get the domain of the email
address
and put it in a separate attribute:
10 =>
array(
10 =>
[
'class' => 'core:AttributeAlter',
'subject' => 'mail',
'pattern' => '/(?:[A-Za-z0-9-]+\.)+[A-Za-z]{2,6}$/',
'target' => 'domain',
'%replace',
)
,
]
,
Defaulting an attribute to one value (Add it with the default before altering) unless another attribute meets a condition:
Defaulting an attribute to one value (add it with the default before altering)
unless another attribute meets a condition:
10 => array ('class' => 'core:AttributeAdd',
'myAttribute' => 'default-value'),
11 => array ('class' => 'core:AttributeAlter',
10 => [
'class' => 'core:AttributeAdd',
'myAttribute' => 'default-value'
],
11 => [
'class' => 'core:AttributeAlter',
'subject' => 'entitlement',
'pattern' => '/faculty/',
'target' => 'myAttribute',
'%replace',
)
,
]
,
Remove internal, private values from eduPersonEntitlement:
10 =>
array(
10 =>
[
'class' => 'core:AttributeAlter',
'subject' => 'eduPersonEntitlement',
'pattern' => '/ldap-admin/',
'%remove',
)
,
]
,
Set a value to be blank (which will be sent as an empty string):
10 =>
array(
10 =>
[
'class' => 'core:AttributeAlter',
'subject' => 'cn',
'pattern' => '/No name/',
'replacement' => '',
'%replace',
)
,
]
,
Set a value to be NULL (which will be sent as a NULL value):
10 =>
array(
10 =>
[
'class' => 'core:AttributeAlter',
'subject' => 'telephone',
'pattern' => '/NULL/',
'replacement' => null,
'%replace',
)
,
]
,
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment