Commit ceae1dc7 authored by Yadd's avatar Yadd
Browse files

SAML in progress (#595)

parent c550606f
......@@ -1643,7 +1643,7 @@ sub resolveArtifact {
'debug' );
# SOAP call
my $soap_answer = $self->ua()->request($request);
my $soap_answer = $self->ua->request($request);
if ( $soap_answer->code() == "200" ) {
$message = $soap_answer->content();
$self->lmLog( "Get message $message", 'debug' );
......
......@@ -148,7 +148,7 @@ sub display {
}
# 2.3 There is a message to disp->conf->conflay
elsif ( my $info = $req->info ) {
elsif ( $info = $req->info ) {
$skinfile = 'info';
%templateParams = (
AUTH_ERROR => $self->error,
......
......@@ -2,7 +2,9 @@ use Test::More;
use strict;
use IO::String;
require 't/test-lib.pm';
BEGIN {
require 't/test-lib.pm';
}
my $maintests = 19;
my $debug = 'debug';
......@@ -135,8 +137,11 @@ SKIP: {
or explain( $res, 'Set-Cookie: something' );
# Post SAML artifact to SP
ok( $res->[2]->[0] =~ m#<form.+?action="http://auth.sp.com(.*?)".+?method="post"#,
'Form method is POST' );
ok(
$res->[2]->[0] =~
m#<form.+?action="http://auth.sp.com(.*?)".+?method="post"#,
'Form method is POST'
);
$url = $1;
ok(
$res->[2]->[0] =~
......
......@@ -3,9 +3,20 @@ package main;
use strict;
use Data::Dumper;
use LWP::UserAgent;
use 5.10.0;
use_ok('Lemonldap::NG::Portal::Main');
BEGIN {
use_ok('Lemonldap::NG::Portal::Main');
}
# Redefine LWP methods for tests
sub LWP::UserAgent::request {
my ( $self, $req ) = @_;
return HTTP::Response->new(500);
}
package main;
our $count = 1;
$Data::Dumper::Deparse = 1;
......@@ -17,7 +28,7 @@ sub count {
return $count;
}
sub explain {
sub main::explain {
my ( $get, $ref ) = @_;
$get = Dumper($get) if ( ref $get );
print STDERR "Expect $ref, get $get\n";
......
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