Stripped app
[catagits/Catalyst-Authentication-Store-LDAP.git] / Test-Session-Broken / lib / Test / LDAP.pm
CommitLineData
ecd7abea 1package Test::LDAP;
2use Moose;
3use namespace::autoclean;
4
5use Catalyst::Runtime 5.80;
6
7# Set flags and add plugins for the application
8#
9# -Debug: activates the debug mode for very useful log messages
10# ConfigLoader: will load the configuration from a Config::General file in the
11# application's home directory
12# Static::Simple: will serve static files from the application's root
13# directory
14
15use Catalyst qw/
16 -Debug
ecd7abea 17 Static::Simple
18
19 Authentication
20 Authorization::Roles
21 Session
22 Session::State::Cookie
23 Session::Store::FastMmap
24/;
25
26extends 'Catalyst';
27
28our $VERSION = '0.01';
29$VERSION = eval $VERSION;
30
31# Configure the application.
32#
33# Note that settings in test_ldap_web.conf (or other external
34# configuration file that you set up manually) take precedence
35# over this when using ConfigLoader. Thus configuration
36# details given here can function as a default configuration,
37# with an external configuration file acting as an override for
38# local deployment.
39
40__PACKAGE__->config(
41 # Disable deprecated behavior needed by old applications
42 disable_component_resolution_regex_fallback => 1,
43
2148a3cd 44 authentication => {
45 default_realm => "ldap",
46
47 realms => {
48 ldap => {
49 credential => {
50 "class" => "Password",
51 "password_field" => "password",
52 "password_type" => "self_check",
53 "password_hash_type" => "crypt",
54 },
55
56 "store" => {
57 "binddn" => "anonymous",
58 "bindpw" => "dontcare",
59
60 "class" => "LDAP",
61
62 "ldap_server" => "ldap.test.no",
63 "ldap_server_options" => {
64 "timeout" => 30,
65 "port" => "636",
66 "scheme" => "ldaps"
67 },
68
69 "role_basedn" => "ou=stavanger,o=test,c=no",
70 "role_field" => "cn",
71 "role_filter" => "(&(objectClass=groupOfNames)(member=%s))",
72 "user_scope" => "one",
73 "user_search_options" => {
74 "deref" => "always"
75 }
76 }
77 }
78 }
79 }
ecd7abea 80);
81
2148a3cd 82
ecd7abea 83# Start the application
84__PACKAGE__->setup();
85
86
87=head1 NAME
88
89Test::LDAP - Catalyst based application
90
91=head1 SYNOPSIS
92
93 script/test_ldap_web_server.pl
94
95=head1 DESCRIPTION
96
97[enter your description here]
98
99=head1 SEE ALSO
100
101L<Test::LDAP::Controller::Root>, L<Catalyst>
102
103=head1 AUTHOR
104
105root
106
107=head1 LICENSE
108
109This library is free software. You can redistribute it and/or modify
110it under the same terms as Perl itself.
111
112=cut
113
1141;