.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "WebAuth::Tests 3pm" .TH WebAuth::Tests 3pm "2019-01-05" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" WebAuth::Tests \- Assists with constructing WebAuth Apache module tests .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use WebAuth::Tests qw(build_page); \& \& my %settings = ( \& test_number => 1, \& test_desc => \*(Aqbasic WebAuth test\*(Aq, \& extended_desc => \e@extended, \& ); \& \& print "Content\-type: text/html\en\en"; \& print build_page(\e%settings); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides shared code for the test suite for the mod_webauth Apache module. It is used by the individual test programs and test Apache configuration to construct a variety of scenarios to exercise most of the functionality of mod_webauth and some of the WebLogin and mod_webkdc features. Most of the test setup is in the Apache configuration, but each test corresponds to a Perl script, which uses this module, that checks environment variables to see that the tests did what they should and provides useful debugging information if they did not. .PP This module is primarily intended for use with the tests that are included with WebAuth and currently includes some defaults that make it difficult to use for other purposes. The goal is to eventually make it more general so that it can be used for building additional tests local to a particular site. .SH "FUNCTIONS" .IX Header "FUNCTIONS" None of the following functions are exported by default. They must be explicitly requested when using the WebAuth::Tests module. .IP "build_page(\s-1SETTINGS\s0)" 4 .IX Item "build_page(SETTINGS)" Performs the work of building a test page that shows the test number, title, information about the test run, and various tables showing current status and tests run. \s-1SETTINGS\s0 should be a reference to a hash, which may contain one or more of the following settings: .RS 4 .IP "test_number" 4 .IX Item "test_number" The number of this test, passed to the template. .IP "test_desc" 4 .IX Item "test_desc" The short description of this test, passed to the template. .IP "extended_description" 4 .IX Item "extended_description" The extended description of this test. This should be a reference to an array that contains one or more paragraphs of text as strings. Each element of the array will be wrapped in

tags. .IP "extra_tests" 4 .IX Item "extra_tests" An anonymous array of hash references, each of which represents a test result. The hash should have three keys: \f(CW\*(C`name\*(C'\fR, \f(CW\*(C`result\*(C'\fR, and \&\f(CW\*(C`comment\*(C'\fR. \f(CW\*(C`name\*(C'\fR should be the name of this test, \f(CW\*(C`result\*(C'\fR should be either \f(CW\*(C`PASS\*(C'\fR or \f(CW\*(C`FAIL\*(C'\fR, and \f(CW\*(C`comment\*(C'\fR should provide additional information about the test. .IP "extra_tests_title" 4 .IX Item "extra_tests_title" If there are extra tests, this will be used as the heading for that test output. If this setting is present, extra_tests should also be present. .IP "multifactor" 4 .IX Item "multifactor" Set this to true to also perform multifactor tests. .IP "template" 4 .IX Item "template" The path (possibly relative) to the template used for generating \s-1HTML.\s0 By default, this is set to \fI../test.tt2\fR, which works for the default mod_webauth test suite (and probably not for anything else). .IP "unauth_loc" 4 .IX Item "unauth_loc" Set this to true if this test will be running without authentication. This is used by the template to change some of the boilerplate text. .RE .RS 4 .RE .IP "run_test(\s-1NAME, RESULT, GOOD, BAD, BOLD\s0)" 4 .IX Item "run_test(NAME, RESULT, GOOD, BAD, BOLD)" Performs a test of WebAuth information, returning an anonymous hash showing the results of the test in the format required by the \&\f(CW\*(C`extra_tests\*(C'\fR setting to \fBbuild_page()\fR. It takes the name of the test, a boolean value that represents the result of the test, text to display on true or false results, and a flag indicating whether to bold true results. .IP "app_lifetime_test" 4 .IX Item "app_lifetime_test" Creates an anonymous array of hash references that contains the results of a test for the lifetime of an application token. The result is suitable for inclusion in \f(CW\*(C`extra_tests\*(C'\fR. .IP "\fBlast_used_test()\fR" 4 .IX Item "last_used_test()" Creates an anonymous array of hash references that contains the results of a test for current last-used time for a token. The result is suitable for inclusion in \f(CW\*(C`extra_tests\*(C'\fR. .SH "BUGS" .IX Header "BUGS" The interactions between this module and its template aren't currently completely documented. .PP No one has yet used this module for anything other than the mod_webauth test suite included in the distribution. It will probably need work to be usable for writing site-specific tests. .SH "AUTHOR" .IX Header "AUTHOR" Roland Schemers and Jon Robertson . .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBTemplate\fR\|(3) .PP This module is part of WebAuth. The current version is available from .