Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp-module-authoauth2
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-module-authoauth2
Commits
1fb49d49
Commit
1fb49d49
authored
5 years ago
by
Sigmund Augdal
Browse files
Options
Downloads
Patches
Plain Diff
Added support for openid connect front channel logout
As per
https://openid.net/specs/openid-connect-frontchannel-1_0.html
parent
0d159043
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/Auth/Source/OpenIDConnect.php
+4
-0
4 additions, 0 deletions
lib/Auth/Source/OpenIDConnect.php
lib/OIDCLogoutHandler.php
+17
-0
17 additions, 0 deletions
lib/OIDCLogoutHandler.php
www/logout.php
+5
-0
5 additions, 0 deletions
www/logout.php
with
26 additions
and
0 deletions
lib/Auth/Source/OpenIDConnect.php
+
4
−
0
View file @
1fb49d49
...
...
@@ -111,6 +111,10 @@ class OpenIDConnect extends \SimpleSAML\Module\authoauth2\Auth\Source\OAuth2
public
function
logout
(
&
$state
)
{
$providerLabel
=
$this
->
getLabel
();
if
(
array_key_exists
(
'oidc:localLogout'
,
$state
)
&&
$state
[
'oidc:localLogout'
]
===
true
)
{
Logger
::
debug
(
"authoauth2:
$providerLabel
OP initiated logout"
);
return
;
}
$endSessionEndpoint
=
$this
->
config
->
getString
(
'urlEndSession'
,
null
);
if
(
!
$endSessionEndpoint
)
{
Logger
::
debug
(
"authoauth2:
$providerLabel
No urlEndSession configured, not doing anything for logout"
);
...
...
This diff is collapsed.
Click to expand it.
lib/OIDCLogoutHandler.php
+
17
−
0
View file @
1fb49d49
...
...
@@ -70,4 +70,21 @@ class OIDCLogoutHandler
\SimpleSAML\Auth\Source
::
completeLogout
(
$state
);
// @codeCoverageIgnoreStart
}
public
function
handleRequest
()
{
$this
->
handleRequestFromRequest
(
$_REQUEST
);
}
public
function
handleRequestFromRequest
(
array
$request
)
{
Logger
::
debug
(
'authoauth2: logout request='
.
var_export
(
$request
,
true
));
$config
=
\SimpleSAML\Configuration
::
getInstance
();
$sourceId
=
$request
[
'authSource'
];
$as
=
new
\SimpleSAML\Auth\Simple
(
$sourceId
);
$as
->
logout
([
'oidc:localLogout'
=>
true
,
'ReturnTo'
=>
$config
->
getBasePath
()
.
'logout.php'
,
]);
}
}
This diff is collapsed.
Click to expand it.
www/logout.php
0 → 100644
+
5
−
0
View file @
1fb49d49
<?php
$handler
=
new
\SimpleSAML\Module\authoauth2\OIDCLogoutHandler
();
$handler
->
handleRequest
();
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