line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Cmis::Agent::HeaderAuth; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
WebService::Cmis::Agent::BasicAuth - authenticate via HTTP headers |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
This class implements authentication using HTTP headers. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
TODO: this is not yet there. |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
See: L |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $client = WebService::Cmis::getClient( |
16
|
|
|
|
|
|
|
url => "http://cmis.alfresco.com/service/cmis", |
17
|
|
|
|
|
|
|
useragent => new WebService::Cmis::Agent::HeaderAuth( |
18
|
|
|
|
|
|
|
remoteUserHeader => 'X-Alfresco-Remote-User' |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $repo = $client->getRepository; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Parent class: L |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
1
|
|
4612
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
29
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
|
5
|
use WebService::Cmis::Agent (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
128
|
|
32
|
|
|
|
|
|
|
our @ISA = qw(WebService::Cmis::Agent); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 METHODS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=over 4 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item new(%params) |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Create a new WebService::Cmis::Agent::HeaderAuth. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
See L for more options. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Parameters: |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=over 4 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=item * remoteUserHeader |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=back |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub new { |
55
|
0
|
|
|
0
|
1
|
|
my ($class, %params) = @_; |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
my $remoteUserHeader = delete $params{remoteUserHeader}; |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
my $this = $class->SUPER::new(%params); |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
$this->{remoteUserHeader} = $remoteUserHeader; |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
return $this; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=back |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Copyright 2012-2013 Michael Daum |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
74
|
|
|
|
|
|
|
the same terms as Perl itself. See F. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
|