version 1.7, 2006/06/02 19:38:21
|
version 1.9, 2006/07/05 18:37:41
|
Line 51 sub goto_login {
|
Line 51 sub goto_login {
|
|
|
sub sso_check { |
sub sso_check { |
my ($data) = @_; |
my ($data) = @_; |
|
my %extra_env; |
if ($data->{'sso.login'}) { |
if ($data->{'sso.login'}) { |
&Apache::lonnet::appenv(('request.sso.login' => |
$extra_env{'request.sso.login'} = $data->{'sso.login'}; |
$data->{'sso.login'} )); |
|
} |
} |
|
return \%extra_env; |
} |
} |
|
|
sub handler { |
sub handler { |
Line 79 sub handler {
|
Line 80 sub handler {
|
my $home=&Apache::lonnet::homeserver($data{'username'},$data{'domain'}); |
my $home=&Apache::lonnet::homeserver($data{'username'},$data{'domain'}); |
if ($home =~ /(con_lost|no_such_host)/) { return &goto_login($r); } |
if ($home =~ /(con_lost|no_such_host)/) { return &goto_login($r); } |
|
|
|
my $extra_env = &sso_check(\%data); |
|
|
if (!$data{'role'}) { |
if (!$data{'role'}) { |
&Apache::lonauth::success($r,$data{'username'},$data{'domain'}, |
&Apache::lonauth::success($r,$data{'username'},$data{'domain'}, |
$home,'/adm/roles'); |
$home,'/adm/roles',$extra_env); |
&sso_check(\%data); |
|
return OK; |
return OK; |
} |
} |
|
|
Line 90 sub handler {
|
Line 92 sub handler {
|
|
|
|
|
&Apache::lonauth::success($r,$data{'username'},$data{'domain'},$home, |
&Apache::lonauth::success($r,$data{'username'},$data{'domain'},$home, |
$next_url); |
$next_url,$extra_env); |
&sso_check(\%data); |
|
return OK; |
return OK; |
} |
} |
|
|