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
87024341
Commit
87024341
authored
6 years ago
by
Patrick Radtke
Browse files
Options
Downloads
Patches
Plain Diff
Update core:PHP doc to discuss $state variable
parent
f4c4381f
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_php.md
+15
-2
15 additions, 2 deletions
modules/core/docs/authproc_php.md
with
15 additions
and
2 deletions
modules/core/docs/authproc_php.md
+
15
−
2
View file @
87024341
`core:PHP`
`core:PHP`
==========
==========
This is a filter which makes it possible to run arbitrary PHP code to modify the attributes of an user.
This is a filter which makes it possible to run arbitrary PHP code to modify the attributes
or state
of an user.
Parameters
Parameters
----------
----------
...
@@ -11,8 +11,14 @@ Parameters
...
@@ -11,8 +11,14 @@ Parameters
It must be
`'core:PHP'`
.
It must be
`'core:PHP'`
.
`code`
`code`
: The PHP code that should be run. This code will have only one variable available:
`$attributes`
.
: The PHP code that should be run. This code will have two variables available:
*
`$attributes`
.
This is an associative array of attributes, and can be modified to add or remove attributes.
This is an associative array of attributes, and can be modified to add or remove attributes.
*
`$state`
.
This is an associative array of request state. It can be modified to adjust data related to the authentication
such as desired NameId, requested Attributes, authnContextRef and many more.
Examples
Examples
--------
--------
...
@@ -43,3 +49,10 @@ Create a random number variable:
...
@@ -43,3 +49,10 @@ Create a random number variable:
);
);
',
',
),
),
Force a specific NameIdFormat. Useful if an SP misbehaves and requests (or publishes) an incorrect NameId
90 => array(
'class' => 'core:PHP',
'code' => '$state["saml:NameIDFormat"] = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient";'
),
\ No newline at end of file
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