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
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
0a856dff
Commit
0a856dff
authored
9 years ago
by
Jaime Perez Crespo
Browse files
Options
Downloads
Patches
Plain Diff
Remove duplicated code.
parent
34cc8fb3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/SimpleSAML/XHTML/IdPDisco.php
+14
-7
14 additions, 7 deletions
lib/SimpleSAML/XHTML/IdPDisco.php
modules/discopower/lib/PowerIdPDisco.php
+1
-28
1 addition, 28 deletions
modules/discopower/lib/PowerIdPDisco.php
with
15 additions
and
35 deletions
lib/SimpleSAML/XHTML/IdPDisco.php
+
14
−
7
View file @
0a856dff
...
...
@@ -505,15 +505,14 @@ class SimpleSAML_XHTML_IdPDisco
/**
*
Handles a request to this discovery service
.
*
Check if an IdP is set or if the request is passive, and redirect accordingly
.
*
*
The IdP disco parameters should be set before calling this function
.
*
@return void If there is no IdP targeted and this is not a passive request
.
*/
p
ublic
function
handleReques
t
()
p
rotected
function
star
t
()
{
$idp
=
$this
->
getTargetIdp
();
if
(
$idp
!==
null
)
{
$extDiscoveryStorage
=
$this
->
config
->
getString
(
'idpdisco.extDiscoveryStorage'
,
null
);
if
(
$extDiscoveryStorage
!==
null
)
{
$this
->
log
(
'Choice made ['
.
$idp
.
'] (Forwarding to external discovery storage)'
);
...
...
@@ -530,15 +529,23 @@ class SimpleSAML_XHTML_IdPDisco
);
\SimpleSAML\Utils\HTTP
::
redirectTrustedURL
(
$this
->
returnURL
,
array
(
$this
->
returnIdParam
=>
$idp
));
}
return
;
}
if
(
$this
->
isPassive
)
{
$this
->
log
(
'Choice not made. (Redirecting the user back without answer)'
);
\SimpleSAML\Utils\HTTP
::
redirectTrustedURL
(
$this
->
returnURL
);
return
;
}
}
/**
* Handles a request to this discovery service.
*
* The IdP disco parameters should be set before calling this function.
*/
public
function
handleRequest
()
{
$this
->
start
();
// no choice made. Show discovery service page
$idpList
=
$this
->
getIdPList
();
...
...
This diff is collapsed.
Click to expand it.
modules/discopower/lib/PowerIdPDisco.php
+
1
−
28
View file @
0a856dff
...
...
@@ -185,34 +185,7 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco {
* The IdP disco parameters should be set before calling this function.
*/
public
function
handleRequest
()
{
$idp
=
$this
->
getTargetIdp
();
if
(
$idp
!==
NULL
)
{
$extDiscoveryStorage
=
$this
->
config
->
getString
(
'idpdisco.extDiscoveryStorage'
,
NULL
);
if
(
$extDiscoveryStorage
!==
NULL
)
{
$this
->
log
(
'Choice made ['
.
$idp
.
'] (Forwarding to external discovery storage)'
);
\SimpleSAML\Utils\HTTP
::
redirectTrustedURL
(
$extDiscoveryStorage
,
array
(
'entityID'
=>
$this
->
spEntityId
,
'IdPentityID'
=>
$idp
,
'returnIDParam'
=>
$this
->
returnIdParam
,
'isPassive'
=>
'true'
,
'return'
=>
$this
->
returnURL
));
}
else
{
$this
->
log
(
'Choice made ['
.
$idp
.
'] (Redirecting the user back. returnIDParam='
.
$this
->
returnIdParam
.
')'
);
\SimpleSAML\Utils\HTTP
::
redirectTrustedURL
(
$this
->
returnURL
,
array
(
$this
->
returnIdParam
=>
$idp
));
}
return
;
}
if
(
$this
->
isPassive
)
{
$this
->
log
(
'Choice not made. (Redirecting the user back without answer)'
);
\SimpleSAML\Utils\HTTP
::
redirectTrustedURL
(
$this
->
returnURL
);
return
;
}
$this
->
start
();
/* No choice made. Show discovery service page. */
$idpList
=
$this
->
getIdPList
();
...
...
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