source: LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm @ 889

Last change on this file since 889 was 889, checked in by nanardon, 12 years ago
  • kill now useless declaration of 'Remote' authentication plugin
File size: 1.8 KB
Line 
1package LATMOS::Accounts::Web;
2
3use strict;
4use warnings;
5
6use Catalyst::Runtime '5.70';
7
8# Set flags and add plugins for the application
9#
10#         -Debug: activates the debug mode for very useful log messages
11#   ConfigLoader: will load the configuration from a YAML file in the
12#                 application's home directory
13# Static::Simple: will serve static files from the application's root
14#                 directory
15
16use Catalyst qw/
17    ConfigLoader
18    Static::Simple
19    Session
20    Session::State::Cookie
21    Session::Store::FastMmap
22    Authentication
23    Prototype
24    XMLRPC
25    /;
26
27our $VERSION = '2.0.1';
28
29# Configure the application.
30
31my $config_file = '/etc/latmos-accounts/latmos-accounts-web.yml';
32if (-r $config_file ) {
33    __PACKAGE__->config( 'Plugin::ConfigLoader' => { 
34            file => $config_file 
35        } 
36    );
37}
38
39# http://stackoverflow.com/questions/1664816/is-there-a-way-to-force-c-urifor-in-catalyst-to-generate-a-uri-that-begins-wit
40__PACKAGE__->config( using_frontend_proxy => 1 );
41
42__PACKAGE__->config( name => 'LATMOS::Accounts::Web' );
43
44__PACKAGE__->config->{'Plugin::Authentication'} = {
45    default_realm => 'la',
46    realms => {
47        la => {
48            credential => {
49                class => 'La'
50            },
51            store => {
52                class => 'Null',
53            },
54        },
55    },
56};
57
58
59# Start the application
60__PACKAGE__->setup;
61
62
63=head1 NAME
64
65LATMOS::Accounts::Web - Catalyst based application
66
67=head1 SYNOPSIS
68
69    script/latmos_accounts_web_server.pl
70
71=head1 DESCRIPTION
72
73[enter your description here]
74
75=head1 SEE ALSO
76
77L<LATMOS::Accounts::Web::Controller::Root>, L<Catalyst>
78
79=head1 AUTHOR
80
81Thauvin Olivier
82
83=head1 LICENSE
84
85This library is free software, you can redistribute it and/or modify
86it under the same terms as Perl itself.
87
88=cut
89
901;
Note: See TracBrowser for help on using the repository browser.