#!/usr/bin/perl
#
# Written by Roland Schemers
# Copyright 2003, 2013
#     The Board of Trustees of the Leland Stanford Junior University
#
# See LICENSE for licensing terms.

use strict;
use warnings;

use WebAuth::Tests qw(build_page);

# Text for the page.
my @extended;
push (@extended,
      'This test is to make sure the WebAuthExtraRedirect directive is '
      .'working. This directive causes an extra redirect after initial '
      .'login, which causes the browser to re-request the URL and removes '
      .'all the extra webauth-related stuff in the URL (the '
      .'"?WEBAUTHR=...;;WEBAUTHS=...;" stuff');
push (@extended,
      'After an initial login, the URL in the address field of the browser '
      .'should not have any query parameters in the URL.');

# Set information for the tests.
my %settings = (
    test_number   => 2,
    test_desc     => 'testing WebAuthExtraRedirect',
    extended_desc => \@extended,
);

print "Content-type: text/html\n\n";
print build_page(\%settings);
