TT#88209 - Create ajax_logout endpoint

* this endpoint will be used to logout from v1
	   automatically when logging out of v2
	 * allow unauthenticated acces to it

Change-Id: Ia40cb624f618ef0b0cada8f22dc2cc68f234af53
mr9.0
Flaviu Mates 5 years ago
parent cf619e1136
commit adcfc4f775

@ -30,6 +30,15 @@ sub logout_index :Path {
$c->response->redirect($c->uri_for('/login'));
}
sub ajax_logout :Chained('/') :PathPart('ajax_logout') :Args(0) {
my ( $self, $c ) = @_;
$c->logout;
$c->response->status(200);
$c->response->content_type('application/json');
$c->response->body('');
$c->detach( $c->view("JSON") );
}
=head1 AUTHOR

@ -125,6 +125,7 @@ sub auto :Private {
or $c->req->uri->path =~ m|^/recoverwebpassword/?$|
or $c->req->uri->path =~ m|^/resetwebpassword/?$|
or $c->req->uri->path =~ m|^/resetpassword/?$|
or $c->req->uri->path =~ m|^/ajax_logout/?$|
or $c->req->uri->path =~ m|^/internalsms/receive/?$|
or $c->req->uri->path =~ m|^/soap/intercept(\.wsdl)?/?$|i
) {

Loading…
Cancel
Save