Revision b5d03350
Von Bernd Bleßmann vor mehr als 5 Jahren hinzugefügt
SL/Dispatcher.pm | ||
---|---|---|
use SL::Form;
|
||
use SL::Helper::DateTime;
|
||
use SL::InstanceConfiguration;
|
||
use SL::MoreCommon qw(uri_encode);
|
||
use SL::Template::Plugin::HTMLFixes;
|
||
use SL::User;
|
||
|
||
... | ... | |
if ( (($script eq 'login') && !$action)
|
||
|| ($script eq 'admin')
|
||
|| (SL::Auth::SESSION_EXPIRED() == $session_result)) {
|
||
$self->redirect_to_login(script => $script, error => 'session');
|
||
|
||
$self->redirect_to_login(routing_type => $routing_type,
|
||
script => $script,
|
||
controller => $script_name,
|
||
action => $action,
|
||
error => 'session');
|
||
}
|
||
|
||
my %auth_result = $self->{auth_handler}->handle(
|
||
... | ... | |
my $action = ($params{script} // '') =~ m/^admin/i ? 'Admin/login' : 'LoginScreen/user_login';
|
||
$action .= '&error=' . $params{error} if $params{error};
|
||
|
||
print $::request->cgi->redirect("controller.pl?action=${action}");
|
||
my $redirect_url = "controller.pl?action=${action}";
|
||
|
||
if ($action =~ m/LoginScreen\/user_login/) {
|
||
require SL::Controller::Base;
|
||
my $controller = SL::Controller::Base->new;
|
||
|
||
delete $params{error};
|
||
delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } };
|
||
my $callback = $controller->url_for(%params, %{$::form});
|
||
$redirect_url .= '&callback=' . uri_encode($callback);
|
||
}
|
||
|
||
print $::request->cgi->redirect($redirect_url);
|
||
$self->end_request;
|
||
}
|
||
|
Auch abrufbar als: Unified diff
Login: Callback setzen bei Session-Timeout