Fix regexp in test scrips (#1415)

This commit is contained in:
Clément OUDOT 2018-05-09 21:24:11 +02:00
parent 1398e87cee
commit 231a024606
3 changed files with 7 additions and 7 deletions

View File

@ -7,9 +7,9 @@ use AuthCAS;
# Configuration
my $host = $ENV{HTTP_HOST};
my ( $domain, $port ) = ( $host =~ /\w+\.(.*?):(\d*)/ );
my ( $domain, $port ) = ( $host =~ /\w+\.([^:]*?)(:\d+)?/ );
my $protocol = ( $ENV{HTTPS} =~ /^on$/i ) ? "https" : "http";
my $portal_url = "$protocol://auth.$domain:$port";
my $portal_url = "$protocol://auth.$domain$port";
my $cas_url = "$portal_url/cas";
my $cas = new AuthCAS( casUrl => $cas_url );
my $cgi = new CGI;

View File

@ -15,10 +15,10 @@ my $color = $cgi->param("color") || "#ddd";
# Local parameters
my $host = $ENV{HTTP_HOST};
my ( $domain, $port ) = ( $host =~ /\w+\.(.*?):(\d*)/ );
my ( $domain, $port ) = ( $host =~ /\w+\.([^:]*?)(:\d+)?/ );
my $protocol = ( $ENV{HTTPS} =~ /^on$/i ) ? "https" : "http";
my $portal_url = "$protocol://auth.$domain:$port";
my $manager_url = "$protocol://manager.$domain:$port";
my $portal_url = "$protocol://auth.$domain$port";
my $manager_url = "$protocol://manager.$domain$port";
# CSS
my $css = <<EOT;

View File

@ -19,9 +19,9 @@ use Digest::SHA
# Configuration
#==============================================================================
my $host = $ENV{HTTP_HOST};
my ( $domain, $port ) = ( $host =~ /\w+\.(.*?):(\d*)/ );
my ( $domain, $port ) = ( $host =~ /\w+\.([^:]*?)(:\d+)?/ );
my $protocol = ( $ENV{HTTPS} =~ /^on$/i ) ? "https" : "http";
my $portal_url = "$protocol://auth.$domain:$port";
my $portal_url = "$protocol://auth.$domain$port";
my $client_id = "lemonldap";
my $client_secret = "secret";
my $authorization_uri = "$portal_url/oauth2/authorize";