package LATMOS::Accounts::Web;

use strict;
use warnings;

use Catalyst::Runtime '5.70';

# Set flags and add plugins for the application
#
#         -Debug: activates the debug mode for very useful log messages
#   ConfigLoader: will load the configuration from a YAML file in the
#                 application's home directory
# Static::Simple: will serve static files from the application's root 
#                 directory

use Catalyst qw/
    ConfigLoader
    Static::Simple
    Session
    Session::State::Cookie
    Session::Store::FastMmap
    Authentication
    Prototype
    /;

our $VERSION = '0.0.5';

# Configure the application. 
#
# Note that settings in LATMOS::Accounts::Web.yml (or other external
# configuration file that you set up manually) take precedence
# over this when using ConfigLoader. Thus configuration
# details given here can function as a default configuration,
# with a external configuration file acting as an override for
# local deployment.

# http://stackoverflow.com/questions/1664816/is-there-a-way-to-force-c-urifor-in-catalyst-to-generate-a-uri-that-begins-wit
__PACKAGE__->config( using_frontend_proxy => 1 );

__PACKAGE__->config( name => 'LATMOS::Accounts::Web' );

__PACKAGE__->config->{'Plugin::Authentication'} = {
    default_realm => 'la',
    realms => {
        la => {
            credential => {
                class => 'La'
            },
            store => {
                class => 'Null',
            },
        },
    },
};


# Start the application
__PACKAGE__->setup;


=head1 NAME

LATMOS::Accounts::Web - Catalyst based application

=head1 SYNOPSIS

    script/latmos_accounts_web_server.pl

=head1 DESCRIPTION

[enter your description here]

=head1 SEE ALSO

L<LATMOS::Accounts::Web::Controller::Root>, L<Catalyst>

=head1 AUTHOR

Thauvin Olivier

=head1 LICENSE

This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

1;
