File Coverage

blib/lib/URN/OASIS/SAML2.pm
Criterion Covered Total %
statement 93 93 100.0
branch n/a
condition n/a
subroutine 31 31 100.0
pod n/a
total 124 124 100.0


line stmt bran cond sub pod time code
1             # vim: tw=120
2             package URN::OASIS::SAML2;
3             our $VERSION = '0.002';
4 1     1   66889 use warnings;
  1         10  
  1         27  
5 1     1   5 use strict;
  1         1  
  1         22  
6              
7             # ABSTRACT: Constants for urn:oasis SAML2 implementations
8              
9 1     1   4 use Exporter qw(import);
  1         1  
  1         137  
10              
11             my @bindings = qw(
12             BINDING_HTTP_POST
13             BINDING_HTTP_ARTIFACT
14             BINDING_HTTP_REDIRECT
15             BINDING_SOAP
16             BINDING_POAS
17             BINDING_REVERSE_SOAP
18             );
19              
20             my @classes = qw(
21             CLASS_UNSPECIFIED
22             CLASS_PASSWORD_PROTECTED
23             CLASS_M2FA_UNREGISTERED
24             CLASS_M2FA_CONTRACT
25             CLASS_SMARTCARD
26             CLASS_SMARTCARD_PKI
27             );
28              
29             my @nameids = qw(
30             NAMEID_EMAIL
31             NAMEID_TRANSIENT
32             NAMEID_PERSISTENT
33             );
34              
35             my @urn = qw(
36             URN_ASSERTION
37             URN_METADATA
38             URN_PROTOCOL
39             URN_SIGNATURE
40             URN_ENCRYPTION
41             );
42              
43             my @ns = qw(
44             NS_ASSERTION
45             NS_METADATA
46             NS_PROTOCOL
47             NS_SIGNATURE
48             NS_ENCRYPTION
49             );
50              
51             our @EXPORT_OK = (@bindings, @classes, @nameids, @ns, @urn);
52              
53             our %EXPORT_TAGS = (
54             all => \@EXPORT_OK,
55             bindings => \@bindings,
56             classes => \@classes,
57             nameid => \@nameids,
58             urn => \@urn,
59             ns => \@ns,
60             );
61              
62 1     1   6 use constant base => 'urn:oasis:names:tc:SAML:';
  1         2  
  1         99  
63 1     1   7 use constant saml2 => base . '2.0:';
  1         1  
  1         45  
64 1     1   6 use constant saml1_1 => base . '1.1:';
  1         1  
  1         51  
65              
66 1     1   6 use constant URN_ASSERTION => saml2 . 'assertion';
  1         2  
  1         37  
67 1     1   5 use constant NS_ASSERTION => 'saml';
  1         10  
  1         61  
68              
69 1     1   5 use constant URN_METADATA => saml2 . 'metadata';
  1         2  
  1         36  
70 1     1   5 use constant NS_METADATA => 'md';
  1         1  
  1         75  
71              
72 1     1   5 use constant URN_PROTOCOL => saml2 . 'protocol';
  1         2  
  1         55  
73 1     1   5 use constant NS_PROTOCOL => 'samlp';
  1         2  
  1         36  
74              
75 1     1   4 use constant URN_SIGNATURE => 'http://www.w3.org/2000/09/xmldsig#';
  1         2  
  1         49  
76 1     1   5 use constant NS_SIGNATURE => 'ds';
  1         2  
  1         49  
77              
78 1     1   5 use constant URN_ENCRYPTION => 'http://www.w3.org/2001/04/xmlenc#';
  1         1  
  1         38  
79 1     1   4 use constant NS_ENCRYPTION => 'xenc';
  1         21  
  1         51  
80              
81              
82 1     1   5 use constant BINDING_HTTP_POST => saml2 . 'bindings:HTTP-POST';
  1         1  
  1         48  
83 1     1   5 use constant BINDING_HTTP_ARTIFACT => saml2 . 'bindings:HTTP-Artifact';
  1         2  
  1         40  
84 1     1   5 use constant BINDING_HTTP_REDIRECT => saml2 . 'bindings:HTTP-Redirect';
  1         1  
  1         47  
85 1     1   5 use constant BINDING_SOAP => saml2 . 'bindings:SOAP';
  1         1  
  1         48  
86 1     1   5 use constant BINDING_POAS => saml2 . 'bindings:POAS';
  1         1  
  1         49  
87 1     1   5 use constant BINDING_REVERSE_SOAP => BINDING_POAS;
  1         3  
  1         76  
88              
89 1     1   6 use constant CLASS_UNSPECIFIED => saml2 . 'ac:classes:unspecified';
  1         2  
  1         46  
90 1     1   4 use constant CLASS_PASSWORD_PROTECTED => saml2 . 'ac:classes:PasswordProtectedTransport';
  1         1  
  1         58  
91 1     1   5 use constant CLASS_M2FA_UNREGISTERED => saml2 . 'ac:classes:MobileTwoFactorUnregistered';
  1         1  
  1         39  
92 1     1   5 use constant CLASS_M2FA_CONTRACT => saml2 . 'ac:classes:MobileTwoFactorContract';
  1         1  
  1         46  
93 1     1   5 use constant CLASS_SMARTCARD => saml2 . 'ac:classes:Smartcard';
  1         2  
  1         62  
94 1     1   6 use constant CLASS_SMARTCARD_PKI => saml2 . 'ac:classes:SmartcardPKI';
  1         1  
  1         45  
95              
96 1     1   5 use constant NAMEID_EMAIL => saml1_1 . 'nameid-format:emailAddress';
  1         1  
  1         52  
97 1     1   5 use constant NAMEID_TRANSIENT => saml1_1 . 'nameid-format:transient';
  1         2  
  1         83  
98 1     1   11 use constant NAMEID_PERSISTENT => saml1_1 . 'nameid-format:persistent';
  1         2  
  1         54  
99              
100             1;
101              
102             __END__