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
ee1e8537
Unverified
Commit
ee1e8537
authored
7 years ago
by
Tim van Dijen
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Coding-style:
PSR-2
parent
6af770ab
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/lib/Auth/Process/ScopeAttribute.php
+8
-9
8 additions, 9 deletions
modules/core/lib/Auth/Process/ScopeAttribute.php
with
8 additions
and
9 deletions
modules/core/lib/Auth/Process/ScopeAttribute.php
+
8
−
9
View file @
ee1e8537
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
*
*
* @package SimpleSAMLphp
* @package SimpleSAMLphp
*/
*/
class
sspmod_core_Auth_Process_ScopeAttribute
extends
SimpleSAML_Auth_ProcessingFilter
{
class
sspmod_core_Auth_Process_ScopeAttribute
extends
SimpleSAML_Auth_ProcessingFilter
{
/**
/**
* The attribute we extract the scope from.
* The attribute we extract the scope from.
*
*
...
@@ -44,7 +44,8 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
...
@@ -44,7 +44,8 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
* @param array $config Configuration information about this filter.
* @param array $config Configuration information about this filter.
* @param mixed $reserved For future use.
* @param mixed $reserved For future use.
*/
*/
public
function
__construct
(
$config
,
$reserved
)
{
public
function
__construct
(
$config
,
$reserved
)
{
parent
::
__construct
(
$config
,
$reserved
);
parent
::
__construct
(
$config
,
$reserved
);
assert
(
is_array
(
$config
));
assert
(
is_array
(
$config
));
...
@@ -62,7 +63,8 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
...
@@ -62,7 +63,8 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
*
*
* @param array &$request The current request
* @param array &$request The current request
*/
*/
public
function
process
(
&
$request
)
{
public
function
process
(
&
$request
)
{
assert
(
is_array
(
$request
));
assert
(
is_array
(
$request
));
assert
(
array_key_exists
(
'Attributes'
,
$request
));
assert
(
array_key_exists
(
'Attributes'
,
$request
));
...
@@ -85,8 +87,7 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
...
@@ -85,8 +87,7 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
}
}
foreach
(
$attributes
[
$this
->
scopeAttribute
]
as
$scope
)
{
foreach
(
$attributes
[
$this
->
scopeAttribute
]
as
$scope
)
{
if
(
strpos
(
$scope
,
'@'
)
!==
false
)
{
if
(
strpos
(
$scope
,
'@'
)
!==
FALSE
)
{
$scope
=
explode
(
'@'
,
$scope
,
2
);
$scope
=
explode
(
'@'
,
$scope
,
2
);
$scope
=
$scope
[
1
];
$scope
=
$scope
[
1
];
}
}
...
@@ -94,7 +95,7 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
...
@@ -94,7 +95,7 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
foreach
(
$attributes
[
$this
->
sourceAttribute
]
as
$value
)
{
foreach
(
$attributes
[
$this
->
sourceAttribute
]
as
$value
)
{
$value
=
$value
.
'@'
.
$scope
;
$value
=
$value
.
'@'
.
$scope
;
if
(
in_array
(
$value
,
$attributes
[
$this
->
targetAttribute
],
TRUE
))
{
if
(
in_array
(
$value
,
$attributes
[
$this
->
targetAttribute
],
true
))
{
// Already present
// Already present
continue
;
continue
;
}
}
...
@@ -102,7 +103,5 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
...
@@ -102,7 +103,5 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
$attributes
[
$this
->
targetAttribute
][]
=
$value
;
$attributes
[
$this
->
targetAttribute
][]
=
$value
;
}
}
}
}
}
}
}
}
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