Commit 4934eb92 authored by Xavier Guimard's avatar Xavier Guimard

Merge branch 'v2.0'

parents cb33dba0 cd8146a1
......@@ -37,6 +37,7 @@
"Apache::Session::Browseable" : "0",
"Convert::Base32" : "0",
"Cookie::Baker::XS" : "0",
"Crypt::URandom" : "0",
"DBI" : "0",
"LWP::Protocol::https" : "0",
"Net::LDAP" : "0",
......
......@@ -23,6 +23,7 @@ recommends:
Apache::Session::Browseable: '0'
Convert::Base32: '0'
Cookie::Baker::XS: '0'
Crypt::URandom: '0'
DBI: '0'
LWP::Protocol::https: '0'
Net::LDAP: '0'
......
......@@ -66,6 +66,7 @@ t/63-Lemonldap-NG-Handler-PSGI-Try.t
t/64-Lemonldap-NG-Handler-PSGI-DevOps.t
t/65-Lemonldap-NG-Handler-PSGI-ServiceToken.t
t/66-Lemonldap-NG-Handler-PSGI-wildcard.t
t/67-Lemonldap-NG-Handler-PSGI-vhostoptions.t
t/99-pod.t
t/lmConf-1.json
t/sessions/lock/Apache-Session-f5eec18ebb9bc96352595e2d8ce962e8ecf7af7c9a98cb9a43f9cd181cf4b545.lock
......
use Test::More;
use JSON;
use MIME::Base64;
use Data::Dumper;
require 't/test-psgi-lib.pm';
......
use Test::More;
use JSON;
use MIME::Base64;
use Data::Dumper;
require 't/test-psgi-lib.pm';
init('Lemonldap::NG::Handler::PSGI', {
vhostOptions => {
'test1.example.com' => {
vhostHttps => 1,
vhostPort => 443,
},
},
locationRules => {
},
exportedHeaders => {
},
https => undef,
port => undef,
maintenance => undef,
});
my $res;
ok( $res = $client->_get('/'), 'Unauthentified query' );
ok( ref($res) eq 'ARRAY', 'Response is an array' ) or explain( $res, 'array' );
ok( $res->[0] == 302, 'Code is 302' ) or explain( $res->[0], 302 );
my %h = @{ $res->[1] };
ok(
$h{Location} eq 'http://auth.example.com/?url='
. encode_base64( 'https://test1.example.com/', '' ),
'Redirection points to portal and site is https'
)
or explain(
\%h,
'Location => http://auth.example.com/?url='
. encode_base64( 'https://test1.example.com/', '' )
);
count(4);
done_testing( count() );
clean();
......@@ -8,7 +8,7 @@ use Mouse;
use Lemonldap::NG::Portal::Main::Constants
qw(PE_OK PE_PP_PASSWORD_EXPIRED PE_PP_CHANGE_AFTER_RESET);
our $VERSION = '2.0.0';
our $VERSION = '2.0.2';
extends 'Lemonldap::NG::Portal::Auth::LDAP';
......
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