CAS in progress (#595)
This commit is contained in:
parent
ad6b42e9f1
commit
7281481802
|
@ -200,28 +200,29 @@ sub run {
|
|||
$self->deleteCasSecondarySessions($session_id);
|
||||
|
||||
# Delete local session
|
||||
unless (
|
||||
$self->p->_deleteSession(
|
||||
$self->p->getApacheSession( $session_id, 1 )
|
||||
)
|
||||
)
|
||||
{
|
||||
$self->lmLog( "Fail to delete session $session_id ", 'error' );
|
||||
}
|
||||
if ( my $session = $self->p->getApacheSession( $session_id, 1 ) ) {
|
||||
unless ( $self->p->_deleteSession( $req, $session ) ) {
|
||||
$self->lmLog( "Fail to delete session $session_id ", 'error' );
|
||||
}
|
||||
|
||||
if ($logout_url) {
|
||||
if ($logout_url) {
|
||||
|
||||
# Display a link to the provided URL
|
||||
$self->lmLog( "Logout URL $logout_url will be displayed", 'debug' );
|
||||
# Display a link to the provided URL
|
||||
$self->lmLog( "Logout URL $logout_url will be displayed",
|
||||
'debug' );
|
||||
|
||||
$self->info( $req,
|
||||
$self->info( $req,
|
||||
'<h3 trmsg="back2CasUrl">The application you just logged out of has provided a link it would like you to follow</h3>'
|
||||
);
|
||||
$self->info( $req,
|
||||
"<p><a href=\"$logout_url\">$logout_url</a></p>" );
|
||||
$self->{activeTimer} = 0;
|
||||
);
|
||||
$self->info( $req,
|
||||
"<p><a href=\"$logout_url\">$logout_url</a></p>" );
|
||||
$self->{activeTimer} = 0;
|
||||
|
||||
return PE_CONFIRM;
|
||||
return PE_CONFIRM;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$self->lmLog( "Unknown session $session_id", 'info' );
|
||||
}
|
||||
|
||||
return PE_LOGOUT_OK;
|
||||
|
|
|
@ -7,7 +7,7 @@ BEGIN {
|
|||
require 't/test-lib.pm';
|
||||
}
|
||||
|
||||
my $maintests = 22;
|
||||
my $maintests = 24;
|
||||
my $debug = 'debug';
|
||||
my ( $issuer, $sp, $res );
|
||||
my %handlerOR = ( issuer => [], sp => [] );
|
||||
|
@ -138,6 +138,25 @@ SKIP: {
|
|||
),
|
||||
'Get iframe from IdP'
|
||||
);
|
||||
|
||||
# Verify that user has been disconnected
|
||||
ok( $res = $issuer->_get( '/', cookie => "lemonldap=$idpId" ),
|
||||
'Query IdP' );
|
||||
ok( $res->[0] == 401, 'User has been disconnected' )
|
||||
or explain( $res->[0], 401 );
|
||||
|
||||
#switch ('sp');
|
||||
#ok( $res = $sp->_get( '/', cookie => "lemonldap=$idpId" ), 'Query IdP' );
|
||||
#ok( $res->[0] == 302, 'Return code is 302' ) or explain( $res->[0], 302 );
|
||||
#ok(
|
||||
# $sp->getRedirection($res) eq
|
||||
# 'http://auth.idp.com/cas/login?service=http://auth.sp.com/',
|
||||
# 'Redirection points to IdP'
|
||||
# )
|
||||
# or explain(
|
||||
# $res->[1],
|
||||
# 'location => http://auth.idp.com/cas/login?service=http://auth.sp.com/'
|
||||
# );
|
||||
}
|
||||
|
||||
count($maintests);
|
||||
|
|
Loading…
Reference in New Issue
Block a user