aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Auth.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2019-07-03 17:25:12 +0100
committerDave Arter <davea@mysociety.org>2019-08-16 14:25:12 +0100
commit90930e50590a6dc3bfbdac345b6286a1b22f0438 (patch)
tree0bce6e19014d2d86c8d75a448b0c58582f7a10b8 /perllib/FixMyStreet/App/Controller/Auth.pm
parent0d39d25104aa5b5bc8fe326772d5984b3f498b43 (diff)
Add support for OIDC logout
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index b1c795b1e..6b2b29044 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -445,6 +445,12 @@ Log the user out. Tell them we've done so.
sub sign_out : Local {
my ( $self, $c ) = @_;
$c->logout();
+
+ if ( $c->sessionid && $c->session->{oauth} && $c->session->{oauth}{logout_redirect_uri} ) {
+ $c->response->redirect($c->session->{oauth}{logout_redirect_uri});
+ delete $c->session->{oauth}{logout_redirect_uri};
+ $c->detach;
+ }
}
sub ajax_sign_in : Path('ajax/sign_in') {