blib/lib/Jifty/Plugin/Authentication/CAS.pm

filter: Statementstmt 68.1% 15 / 22 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 50.0% 4 / 8 Podpod 50.0% 2 / 4 totaltotal 56.7% 21 / 37 CC 2 SCAR 8.9
CC
2
Cov
62%
init
6.0
prereq_plugins
2.0
CAS
2.0
CRAP 2.4
« blib/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm ↑ Summary blib/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogout.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Jifty::Plugin::Authentication::CAS;
5 1 ▶use base qw/Jifty::Plugin/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Authen::CAS::Client;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 our $VERSION = '1.00';
9  
10 =head1 NAME
11  
12 Jifty::Plugin::Authentication::CAS - JA-SIG CAS authentication plugin for Jifty
13  
14 =head1 DESCRIPTION
15  
16 This may be combined with the L<Jifty::Plugin::User> plugin to provide user authentication using JA-SIG CAS protocol to your application.
17  
18 https is managed with Crypt::SSLeay
19  
20 =head1 CONFIG
21  
22 in etc/config.yml
23  
24 Plugins:
25 - Authentication::CAS:
26 CASUrl: https://auth.univ-metz.fr/cas
27 CASDomain: univ-metz.fr # optional: create email if login@domain is valid
28  
29  
30 =head1 METHODS
31  
32 =head2 prereq_plugins
33  
34 This plugin depends on the L<User|Jifty::Plugin::User> plugin.
35  
36 =cut
37  
38  
39 0 ▶sub prereq_plugins {
Subroutine prereq_plugins: not called CC=1 SCAR=6.9
Pod documented
40 0 return ('User');
41 }
42  
43  
44 1 my ($CAS,$domain);
45  
46 =head2 init
47  
48 load config
49  
50 =cut
51  
52 0 ▶sub init {
Subroutine init: not called CC=2 SCAR=17.9
Pod documented
53 0 my $self = shift;
54 0 my %args = @_;
55  
56 0 $CAS = Authen::CAS::Client->new ( $args{'CASUrl'} );
57 0 ▶ $domain = $args{'CASDomain'} || "" ;
Condition0%0/2
$args{'CASDomain'} || ''
l!l
00
MC/DC0%0/1
$args{'CASDomain'} || ''
$args{'CASDomain'}
Truth table0%0/2
A
A= $args{'CASDomain'}
Aresult
11
00
58 };
59  
60  
61 0 ▶sub CAS {
Subroutine CAS: not called CC=1 SCAR=6.9
Pod undocumented
62 0 return $CAS;
63 };
64  
65 0 ▶sub domain {
Subroutine domain: not called CC=1 SCAR=6.9
Pod undocumented
66 0 return $domain;
67 };
68  
69 =head1 SEE ALSO
70  
71 L<Jifty::Manual::AccessControl>, L<Jifty::Plugin::User>, L<Authen::CAS::Client>
72  
73 =head1 AUTHOR
74  
75 Yves Agostini, <yvesago@cpan.org>
76  
77 =head1 LICENSE
78  
79 Copyright 2007-2009 Yves Agostini. All Rights Reserved.
80  
81 This program is free software and may be modified and distributed under the same terms as Perl itself.
82  
83 =cut
84  
85 1 1;
« blib/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogin.pm ↑ Summary blib/lib/Jifty/Plugin/Authentication/CAS/Action/CASLogout.pm »