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
8d4a2429
Unverified
Commit
8d4a2429
authored
7 years ago
by
Tim van Dijen
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove deprecated call to SimpleSAML_Error_NoPassive
parent
3e1e7064
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/saml/lib/Error.php
+23
-14
23 additions, 14 deletions
modules/saml/lib/Error.php
with
23 additions
and
14 deletions
modules/saml/lib/Error.php
+
23
−
14
View file @
8d4a2429
...
...
@@ -5,8 +5,8 @@
*
* @package SimpleSAMLphp
*/
class
sspmod_saml_Error
extends
SimpleSAML_Error_Exception
{
class
sspmod_saml_Error
extends
SimpleSAML_Error_Exception
{
/**
* The top-level status code.
*
...
...
@@ -39,7 +39,8 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception {
* @param string|NULL $statusMessage The status message. Can be NULL, in which case there is no status message.
* @param Exception|NULL $cause The cause of this exception. Can be NULL.
*/
public
function
__construct
(
$status
,
$subStatus
=
NULL
,
$statusMessage
=
NULL
,
Exception
$cause
=
NULL
)
{
public
function
__construct
(
$status
,
$subStatus
=
null
,
$statusMessage
=
null
,
Exception
$cause
=
null
)
{
assert
(
is_string
(
$status
));
assert
(
$subStatus
===
null
||
is_string
(
$subStatus
));
assert
(
$statusMessage
===
null
||
is_string
(
$statusMessage
));
...
...
@@ -64,7 +65,8 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception {
*
* @return string The top-level status code.
*/
public
function
getStatus
()
{
public
function
getStatus
()
{
return
$this
->
status
;
}
...
...
@@ -74,7 +76,8 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception {
*
* @return string|NULL The second-level status code or NULL if no second-level status code is present.
*/
public
function
getSubStatus
()
{
public
function
getSubStatus
()
{
return
$this
->
subStatus
;
}
...
...
@@ -84,7 +87,8 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception {
*
* @return string|NULL The status message or NULL if no status message is present.
*/
public
function
getStatusMessage
()
{
public
function
getStatusMessage
()
{
return
$this
->
statusMessage
;
}
...
...
@@ -98,8 +102,8 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception {
* @param Exception $exception The original exception.
* @return sspmod_saml_Error The new exception.
*/
public
static
function
fromException
(
Exception
$exception
)
{
public
static
function
fromException
(
Exception
$exception
)
{
if
(
$exception
instanceof
sspmod_saml_Error
)
{
// Return the original exception unchanged
return
$exception
;
...
...
@@ -123,7 +127,7 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception {
}
else
{
$e
=
new
self
(
\SAML2\Constants
::
STATUS_RESPONDER
,
NULL
,
null
,
get_class
(
$exception
)
.
': '
.
$exception
->
getMessage
(),
$exception
);
...
...
@@ -144,20 +148,24 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception {
*
* @return SimpleSAML_Error_Exception An exception representing this error.
*/
public
function
toException
()
{
$e
=
NULL
;
public
function
toException
()
{
$e
=
null
;
switch
(
$this
->
status
)
{
case
\SAML2\Constants
::
STATUS_RESPONDER
:
switch
(
$this
->
subStatus
)
{
case
\SAML2\Constants
::
STATUS_NO_PASSIVE
:
$e
=
new
SimpleSAML_Error_NoPassive
(
$this
->
statusMessage
,
0
,
$this
);
$e
=
new
SimpleSAML\Module\saml\Error\NoPassive
(
\SAML2\Constants
::
STATUS_RESPONDER
,
$this
->
statusMessage
);
break
;
}
break
;
}
if
(
$e
===
NULL
)
{
if
(
$e
===
null
)
{
return
$this
;
}
...
...
@@ -174,7 +182,8 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception {
* @param string $status The status code.
* @return string A shorter version of the status code.
*/
private
static
function
shortStatus
(
$status
)
{
private
static
function
shortStatus
(
$status
)
{
assert
(
is_string
(
$status
));
$t
=
'urn:oasis:names:tc:SAML:2.0:status:'
;
...
...
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