| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
## @file |
|
2
|
|
|
|
|
|
|
# Deprecated: use "cda" parameter instead |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
## @class |
|
5
|
|
|
|
|
|
|
# Deprecated: use "cda" parameter instead |
|
6
|
|
|
|
|
|
|
package Lemonldap::NG::Portal::CDA; |
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
19599
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
49
|
|
|
9
|
1
|
|
|
1
|
|
459
|
use Lemonldap::NG::Portal::SharedConf qw(:all); |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '1.0.0'; |
|
12
|
|
|
|
|
|
|
use base ('Lemonldap::NG::Portal::SharedConf'); |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
*EXPORT_OK = *Lemonldap::NG::Portal::SharedConf::EXPORT_OK; |
|
15
|
|
|
|
|
|
|
*EXPORT_TAGS = *Lemonldap::NG::Portal::SharedConf::EXPORT_TAGS; |
|
16
|
|
|
|
|
|
|
*EXPORT = *Lemonldap::NG::Portal::SharedConf::EXPORT; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
################## |
|
19
|
|
|
|
|
|
|
# OVERLOADED SUB # |
|
20
|
|
|
|
|
|
|
################## |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
## @cmethod Lemonldap::NG::Portal::CDA new(array params) |
|
23
|
|
|
|
|
|
|
# Call Lemonldap::NG::Portal::SharedConf::new() with "cda" parameter set to 1 |
|
24
|
|
|
|
|
|
|
# @param params Lemonldap::NG::Portal::SharedConf::new() parameters |
|
25
|
|
|
|
|
|
|
# @return New Lemonldap::NG::Portal::CDA object |
|
26
|
|
|
|
|
|
|
sub new { |
|
27
|
|
|
|
|
|
|
my $class = shift; |
|
28
|
|
|
|
|
|
|
my $self = $class->SUPER::new(@_); |
|
29
|
|
|
|
|
|
|
$self->{cda} = 1; |
|
30
|
|
|
|
|
|
|
return $self; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
|
34
|
|
|
|
|
|
|
__END__ |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=encoding utf8 |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Lemonldap::NG::Portal::CDA - Perl extension for building Lemonldap::NG |
|
41
|
|
|
|
|
|
|
compatible portals with Cross Domain Authentication. |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
use Lemonldap::NG::Portal::SharedConf; |
|
46
|
|
|
|
|
|
|
my $portal = new Lemonldap::NG::Portal::SharedConf( { |
|
47
|
|
|
|
|
|
|
cda => 1, |
|
48
|
|
|
|
|
|
|
configStorage => { |
|
49
|
|
|
|
|
|
|
type => 'DBI', |
|
50
|
|
|
|
|
|
|
dbiChain => "dbi:mysql:...", |
|
51
|
|
|
|
|
|
|
dbiUser => "lemonldap", |
|
52
|
|
|
|
|
|
|
dbiPassword => "password", |
|
53
|
|
|
|
|
|
|
dbiTable => "lmConfig", |
|
54
|
|
|
|
|
|
|
}, |
|
55
|
|
|
|
|
|
|
} ); |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
if($portal->process()) { |
|
58
|
|
|
|
|
|
|
# Write here the menu with CGI methods. This page is displayed ONLY IF |
|
59
|
|
|
|
|
|
|
# the user was not redirected here. |
|
60
|
|
|
|
|
|
|
print $portal->header('text/html; charset=utf-8'); # DON'T FORGET THIS (see L<CGI(3)>) |
|
61
|
|
|
|
|
|
|
print "..."; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
# or redirect the user to the menu |
|
64
|
|
|
|
|
|
|
print $portal->redirect( -uri => 'https://portal/menu'); |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
else { |
|
67
|
|
|
|
|
|
|
# Write here the html form used to authenticate with CGI methods. |
|
68
|
|
|
|
|
|
|
# $portal->error returns the error message if athentification failed |
|
69
|
|
|
|
|
|
|
# Warning: by defaut, input names are "user" and "password" |
|
70
|
|
|
|
|
|
|
print $portal->header('text/html; charset=utf-8'); # DON'T FORGET THIS (see L<CGI(3)>) |
|
71
|
|
|
|
|
|
|
print "..."; |
|
72
|
|
|
|
|
|
|
print '<form method="POST">'; |
|
73
|
|
|
|
|
|
|
# In your form, the following value is required for redirection |
|
74
|
|
|
|
|
|
|
print '<input type="hidden" name="url" value="'.$portal->param('url').'">'; |
|
75
|
|
|
|
|
|
|
# Next, login and password |
|
76
|
|
|
|
|
|
|
print 'Login : <input name="user"><br>'; |
|
77
|
|
|
|
|
|
|
print 'Password : <input name="password" type="password" autocomplete="off">'; |
|
78
|
|
|
|
|
|
|
print '<input type="submit" value="go" />'; |
|
79
|
|
|
|
|
|
|
print '</form>'; |
|
80
|
|
|
|
|
|
|
} |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Modify your httpd.conf: |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
<Location /My/File> |
|
85
|
|
|
|
|
|
|
SSLVerifyClient require |
|
86
|
|
|
|
|
|
|
SSLOptions +ExportCertData +CompatEnvVars +StdEnvVars |
|
87
|
|
|
|
|
|
|
</Location> |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This file is maintened only for compatibility. Now set "cda => 1" in the |
|
92
|
|
|
|
|
|
|
portal. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
L<Lemonldap::NG::SharedConf>, L<Lemonldap::NG::Handler>, |
|
97
|
|
|
|
|
|
|
L<Lemonldap::NG::Handler::CDA>, |
|
98
|
|
|
|
|
|
|
L<http://lemonldap-ng.org/> |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 AUTHOR |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=over |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt> |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt> |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item Thomas Chemineau, E<lt>thomas.chemineau@gmail.comE<gt> |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=back |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 BUG REPORT |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Use OW2 system to report bug or ask for features: |
|
115
|
|
|
|
|
|
|
L<http://jira.ow2.org> |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 DOWNLOAD |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Lemonldap::NG is available at |
|
120
|
|
|
|
|
|
|
L<http://forge.objectweb.org/project/showfiles.php?group_id=274> |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=over |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=item Copyright (C) 2007, 2008, 2009, 2010 by Xavier Guimard, E<lt>x.guimard@free.frE<gt> |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item Copyright (C) 2010, 2012 by Clement Oudot, E<lt>clem.oudot@gmail.comE<gt> |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=item Copyright (C) 2008 by Thomas Chemineau, E<lt>thomas.chemineau@gmail.comE<gt> |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=back |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
|
135
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
|
136
|
|
|
|
|
|
|
the Free Software Foundation; either version 2, or (at your option) |
|
137
|
|
|
|
|
|
|
any later version. |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
|
140
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
141
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
142
|
|
|
|
|
|
|
GNU General Public License for more details. |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License |
|
145
|
|
|
|
|
|
|
along with this program. If not, see L<http://www.gnu.org/licenses/>. |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |
|
148
|
|
|
|
|
|
|
|