Commit 13514267 authored by Yadd's avatar Yadd

CAS in progress (#595)

NB: I know that test is broken for now
parent 5ac69452
......@@ -194,14 +194,14 @@ sub run {
$self->lmLog( "URL $url detected as an CAS LOGOUT URL", 'debug' );
# GET parameters
my $logout_url = $self->param('url');
my $logout_url = $req->param('url');
# Delete linked CAS sessions
$self->deleteCasSecondarySessions($session_id);
# Delete local session
unless (
$self->_deleteSession(
$self->p->_deleteSession(
$self->p->getApacheSession( $session_id, 1 )
)
)
......
......@@ -75,7 +75,7 @@ sub _redirect {
$self->p->sessionDatas,
@{ $self->p->afterDatas },
sub {
return $self->run(@_, @path);
return $self->run( @_, @path );
}
]
);
......@@ -90,7 +90,7 @@ sub _pRedirect {
# Case 3: authentified user, launch
sub _forAuthUser {
my ( $self, $req ) = @_;
my ( $self, $req, @path ) = @_;
return $self->p->do(
$req,
[
......@@ -98,7 +98,7 @@ sub _forAuthUser {
'controlUrl',
@{ $self->p->forAuthUser },
sub {
return $self->run(@_);
return $self->run( @_, @path );
},
]
);
......
......@@ -7,7 +7,7 @@ BEGIN {
require 't/test-lib.pm';
}
my $maintests = 19;
my $maintests = 22;
my $debug = 'debug';
my ( $issuer, $sp, $res );
my %handlerOR = ( issuer => [], sp => [] );
......@@ -116,7 +116,28 @@ SKIP: {
),
'Query SP for logout'
);
print STDERR Dumper($res);
ok( $res->[0] == 200, 'Response is 200' ) or explain( $res->[0], 200 );
ok(
$res->[2]->[0] =~
m#iframe src="http://auth.idp.com(/cas/logout)\?(.+?)"#s,
'Found iframe'
);
#print STDERR Dumper($res);
# Query IdP with iframe src
$url = $1;
$query = $2;
switch ('issuer');
ok(
$res = $issuer->_get(
$1,
query => $query,
accept => 'text/html',
cookie => "lemonldap=$idpId"
),
'Get iframe from IdP'
);
}
count($maintests);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment