[Jifty-commit] r4193 - in apps/CASPlus/trunk: lib/CASPlus
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Oct 2 16:18:28 EDT 2007
Author: sterling
Date: Tue Oct 2 16:18:27 2007
New Revision: 4193
Modified:
apps/CASPlus/trunk/ (props changed)
apps/CASPlus/trunk/lib/CASPlus/View.pm
Log:
r12806 at dynpc145: andrew | 2007-10-02 15:16:34 -0500
Adding POD to CASPlus::View.
Modified: apps/CASPlus/trunk/lib/CASPlus/View.pm
==============================================================================
--- apps/CASPlus/trunk/lib/CASPlus/View.pm (original)
+++ apps/CASPlus/trunk/lib/CASPlus/View.pm Tue Oct 2 16:18:27 2007
@@ -27,6 +27,22 @@
our ($xml, $casns);
+=head1 NAME
+
+CASPlus::View - templates for generating the pages of CAS+
+
+=head1 DESCRIPTION
+
+This module contains the basic templates for CAS+. This includes login, logout, and the CAS 1.0 and 2.0 protocol views.
+
+=head1 METHODS
+
+=head2 cas_xml
+
+This is a helper used by the various CAS 2.0 protocol views to render the required XML data.
+
+=cut
+
sub cas_xml(&) {
my $code = shift;
@@ -59,6 +75,14 @@
};
}
+=head1 TEMPLATES
+
+=head2 login
+
+Shows the login screen if the user has not yet logged in. Shows the status screen if the user has logged in.
+
+=cut
+
template login => page {
{ title is 'Login' };
@@ -121,6 +145,12 @@
};
};
+=head2 logout
+
+Logs the user out of CAS+ and reports the status of login.
+
+=cut
+
template 'logout' => page {
{ title is 'Logged out' };
@@ -136,6 +166,12 @@
}
};
+=head1 status
+
+This page shows the current user's login status.
+
+=cut
+
template 'status' => page {
{ title is 'Login Status' };
@@ -158,6 +194,12 @@
}
};
+=head2 proxy
+
+This page implements the proxy request screen used by services to retrieve a proxy ticket according to CAS 2.0.
+
+=cut
+
template 'proxy' => cas_xml {
my $result = get 'result';
@@ -178,6 +220,12 @@
}
};
+=head2 proxyValidate
+
+This implements the proxy validation screen used by services to validate proxy or service tickets according to CAS 2.0.
+
+=cut
+
template 'proxyValidate' => cas_xml {
my $result = get 'result';
@@ -212,6 +260,12 @@
}
};
+=head2 serviceValidate
+
+This implements the service ticket validator for CAS 2.0. It can be used by services to validate a service ticket passed to them by a browser to ascertain its validity.
+
+=cut
+
template 'serviceValidate' => cas_xml {
my $result = get 'result';
@@ -237,6 +291,12 @@
}
};
+=head2 validate
+
+This provides the service ticket validation screen for CAS 1.0. This is similar to L</serviceValidate>, but returns the information in the plain text format used by CAS 1.0 rather than the XML used by CAS 2.0.
+
+=cut
+
template 'validate' => sub {
Jifty->handler->apache->content_type('text/plain');
@@ -249,12 +309,24 @@
}
};
+=head1 admin
+
+This renders the administration menu.
+
+=cut
+
template 'admin' => page {
{ title is 'Administer' };
CASPlus->admin_menu->render_as_admin_page;
};
+=head1 admin/setup
+
+This renders a special page that is only available after the initial installation of CAS+. This page is used to create the very first superuser account.
+
+=cut
+
template 'admin/setup' => page {
{ title is 'Setup CAS+' };
@@ -268,6 +340,12 @@
};
};
+=head2 admin/users/recalculate
+
+This renders the form for manual recalculation of the user's role cache.
+
+=cut
+
template 'admin/users/recalculate' => page {
{ title is 'Recalculate Roles' };
@@ -279,12 +357,32 @@
};
};
+=head1 OTHER VIEWS
+
+=head2 user/**
+
+See L<CASPlus::View::User>.
+
+=cut
+
use CASPlus::View::User;
alias CASPlus::View::User under '/user';
+=head2 error/**
+
+See L<CASPlus::View::Error>.
+
+=cut
+
use CASPlus::View::Error;
alias CASPlus::View::Error under '/error';
+=head2 admin/**
+
+A number of administrative views are available under the C<CASPlus::View::Admin>.
+
+=cut
+
use Jifty::View::Declare::CRUD;
while (my ($view, $model) = each %ADMIN_CRUD_VIEWS) {
my $view_class = 'CASPlus::View::Admin::' . $view;
@@ -319,6 +417,18 @@
};
}
+=head1 AUTHORS
+
+Andrew Sterling Hanenkamp, C<< <andrew.hanenkamp at cpan.org> >>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2007 Boomer Consulting, Inc.
+
+This program is free software and may be modified and distributed under the same terms as Perl itself.
+
+=cut
+
#use Template::Declare::XML;
#use Jifty::View::Declare schema {
# namespace cas => 'http://www.yale.edu/tp/cas';
More information about the Jifty-commit
mailing list