view release on metacpan or search on metacpan
350351352353354355356357358359360361362363364365366367368369370You can set this option to customize the login form that is created
when
a user needs to be authenticated. If you wish to replace the
entire login form
with
a completely custom version, then just set
LOGIN_RUNMODE to point to your custom runmode.
All of the parameters listed below are optional, and a reasonable
default
will be used
if
left blank:
DISPLAY_CLASS (
default
: Classic)
the class used to display the login form. The alternative is
"Basic"
which aims
for
XHTML compliance and leaving style to
CSS. See CGI::Application::Plugin::Authentication::Display
for
more details.
TITLE (
default
: Sign In)
the heading at the top of the login box
USERNAME_LABEL (
default
: User Name)
the label
for
the user name input
PASSWORD_LABEL (
default
: Password)
example/templates/login.tmpl view on Meta::CPAN
123456789101112<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<
link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/template.css"
/>
<!--[
if
lt IE 8]>
<
link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/ieonly.css"
/>
<![endif]-->
<!--[
if
lt IE 7]>
<
link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/ieonly6.css"
/>
<![endif]-->
example/templates/one.tmpl view on Meta::CPAN
123456789101112<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Untitled Document</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<h2>This page is NOT protected</h2><a href=
"?rm=two"
>Protected Runmode</a>
</body>
</html>
example/templates/two.tmpl view on Meta::CPAN
123456789101112<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Untitled Document</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
<TMPL_VAR NAME=
"login.enforce_protection"
>
</head>
<body>
<h2>This page is protected</h2><h2>username: test</h2><br/><a href=
"?rm=one"
>Un-Protected Runmode</a>
<TMPL_VAR NAME=
"login.logout_form"
>
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
430431432433434435436437438439440441442443444445446447448449runmode.
All of the parameters listed below are optional, and a reasonable
default
will
be used
if
left blank:
=over 4
=item DISPLAY_CLASS (default: Classic)
the class used to display the login form. The alternative is C<Basic>
which aims for XHTML compliance and leaving style to CSS. See
L<CGI::Application::Plugin::Authentication::Display> for more details.
=item TITLE (default: Sign In)
the heading at the top of the login box
=item USERNAME_LABEL (default: User Name)
the label for the user name input
lib/CGI/Application/Plugin/Authentication/Display.pm view on Meta::CPAN
919293949596979899100101102103104105106107108109110111=item
The subclass L<CGI::Application::Plugin::Authentication::Display::Classic>
is provided to ensure backwards compatibility with the old code. It has
the advantage of working out of the box but still retaining flexibility.
=item
The subclass L<CGI::Application::Plugin::Authentication::Display::Basic>
is provided to ensure XHTML compliance and to leave styling to CSS style-sheets.
=item
You can handle all the HTML side yourself in which case this code is not even loaded.
=item
You can use derived classes in templates that have dot support, which keeps
the display code close to the templates. This has other advantages. For example
one can use the C<enforce_protection> method to mark a template as being
lib/CGI/Application/Plugin/Authentication/Display/Basic.pm view on Meta::CPAN
102103104105106107108109110111112113114115116117118119120121
<input type=
"hidden"
name=
"destination"
value=
"${destination}"
/>
<input type=
"hidden"
name=
"rm"
value=
"${runmode}"
/>
</form>
END
return
$html
;
}
=head1 NAME
CGI::Application::Plugin::Authentication::Display::Basic - XHTML compliant no frills login display driver
=head1 DESCRIPTION
This module provides a login box that works out of the box but which can be
configured to modify the styling.
=head1 METHODS
=head2 new
t/out/frontpage-dev view on Meta::CPAN
1234567891011121314151617Content-Type: text/html; charset=ISO-8859-1
This is public
<script language=
"javascript"
>
var devpopup_window = window.
open
(
""
,
"devpopup_window"
,
"height=400,width=600,scrollbars,resizable"
);
devpopup_window.document.
write
(
"<?xml version=\"1.0\"?>\n"
+
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n"
+
"\n"
+
"<head>\n"
+
" <title>Devpopup results</title>\n"
+
" <style type=\"text/css\">\n"
+
" div.report { border: dotted 1px black; margin: 1em;}\n"
+
" div.report h2 { color: #000; background-color: #ddd; padding:.2em; margin-top:0;}\n"
+
" div.report_full, div.report_summary { padding: 0em 1em; }\n"
+
" a:hover, div.report h2:hover, a.print_button:hover { cursor: pointer; background-color: #eee; }\n"
+
t/out/generic_login view on Meta::CPAN
12345678910111213141516Set-Cookie: CAPAUTH_DATA=; path=/; expires=;
Date
Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/grey2 view on Meta::CPAN
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/login view on Meta::CPAN
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/login-dev view on Meta::CPAN
1234567891011121314151617Content-Type: text/html; charset=ISO-8859-1
This is public
<script language=
"javascript"
>
var devpopup_window = window.
open
(
""
,
"devpopup_window"
,
"height=400,width=600,scrollbars,resizable"
);
devpopup_window.document.
write
(
"<?xml version=\"1.0\"?>\n"
+
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n"
+
"\n"
+
"<head>\n"
+
" <title>Devpopup results</title>\n"
+
" <style type=\"text/css\">\n"
+
" div.report { border: dotted 1px black; margin: 1em;}\n"
+
" div.report h2 { color: #000; background-color: #ddd; padding:.2em; margin-top:0;}\n"
+
" div.report_full, div.report_summary { padding: 0em 1em; }\n"
+
" a:hover, div.report h2:hover, a.print_button:hover { cursor: pointer; background-color: #eee; }\n"
+
t/out/missing_color view on Meta::CPAN
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/names_of_colours view on Meta::CPAN
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/names_of_colours_2 view on Meta::CPAN
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/names_of_colours_3 view on Meta::CPAN
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/other_permutations view on Meta::CPAN
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/percentage view on Meta::CPAN
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/redirection_failure view on Meta::CPAN
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/redirection_failure_basic view on Meta::CPAN
1234567891011121314Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<form id=
"loginform"
method=
"post"
action=
""
>
<div class=
"login"
>
t/out/success-dev view on Meta::CPAN
12345678910111213141516171819Set-Cookie: CAPAUTH_DATA=; path=/; expires=;
Date
Content-Type: text/html; charset=ISO-8859-1
This is private
<script language=
"javascript"
>
var devpopup_window = window.
open
(
""
,
"devpopup_window"
,
"height=400,width=600,scrollbars,resizable"
);
devpopup_window.document.
write
(
"<?xml version=\"1.0\"?>\n"
+
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n"
+
"\n"
+
"<head>\n"
+
" <title>Devpopup results</title>\n"
+
" <style type=\"text/css\">\n"
+
" div.report { border: dotted 1px black; margin: 1em;}\n"
+
" div.report h2 { color: #000; background-color: #ddd; padding:.2em; margin-top:0;}\n"
+
" div.report_full, div.report_summary { padding: 0em 1em; }\n"
+
" a:hover, div.report h2:hover, a.print_button:hover { cursor: pointer; background-color: #eee; }\n"
+
t/out/username view on Meta::CPAN
12345678910111213141516Set-Cookie: CAPAUTH_DATA=; path=/; expires=;
Date
Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<style type=
"text/css"
>
<!--/* <![CDATA[ */
t/out/username-basic view on Meta::CPAN
12345678910111213141516Set-Cookie: CAPAUTH_DATA=; path=/; expires=;
Date
Content-Type: text/html; charset=ISO-8859-1
<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<title>Sign In</title>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
</head>
<body>
<form id=
"loginform"
method=
"post"
action=
""
>
<div class=
"login"
>