File Coverage

blib/lib/URN/OASIS/SAML2.pm
Criterion Covered Total %
statement 144 144 100.0
branch n/a
condition n/a
subroutine 48 48 100.0
pod n/a
total 192 192 100.0


line stmt bran cond sub pod time code
1             # vim: tw=120
2             package URN::OASIS::SAML2;
3             our $VERSION = '0.007';
4 3     3   423882 use warnings;
  3         8  
  3         195  
5 3     3   15 use strict;
  3         35  
  3         98  
6              
7             # ABSTRACT: Constants for urn:oasis SAML2 implementations
8              
9 3     3   13 use Exporter qw(import);
  3         4  
  3         581  
10              
11             my @binding = 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 @class = 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 @nameid = qw(
30             NAMEID_FORMAT
31             NAMEID_FORMAT_ENTITY
32             NAMEID_ENTITY
33             NAMEID_KERBEROS
34             NAMEID_EMAIL
35             NAMEID_TRANSIENT
36             NAMEID_PERSISTENT
37             NAMEID_UNSPECIFIED
38             NAMEID_DEFAULT
39             NAMEID_X509_SUBJECT_NAME
40             NAMEID_WINDOWS_DOMAIN_QUALIFIED_NAME
41             );
42              
43             my @urn = qw(
44             URN_ASSERTION
45             URN_METADATA
46             URN_PROTOCOL
47             URN_SIGNATURE
48             URN_ENCRYPTION
49             URN_PROTOCOL_ARTIFACT_RESPONSE
50             URN_PROTOCOL_LOGOUT_REQUEST
51             URN_PROTOCOL_RESPONSE
52             );
53              
54             my @ns = qw(
55             NS_ASSERTION
56             NS_METADATA
57             NS_PROTOCOL
58             NS_SIGNATURE
59             NS_ENCRYPTION
60             );
61              
62             my @status = qw(
63             STATUS_AUTH_FAILED
64             STATUS_REQUESTER
65             STATUS_REQUEST_DENIED
66             STATUS_RESPONDER
67             STATUS_SUCCESS
68             STATUS_PARTIAL_LOGOUT
69             );
70              
71             our @EXPORT_OK = (@binding, @class, @nameid, @ns, @urn, @status);
72              
73             our %EXPORT_TAGS = (
74             all => \@EXPORT_OK,
75             bindings => \@binding,
76             binding => \@binding,
77             classes => \@class,
78             class => \@class,
79             nameid => \@nameid,
80             urn => \@urn,
81             ns => \@ns,
82             status => \@status,
83             );
84              
85 3     3   17 use constant base => 'urn:oasis:names:tc:SAML:';
  3         5  
  3         320  
86 3     3   15 use constant saml2 => base . '2.0:';
  3         5  
  3         211  
87 3     3   16 use constant saml1_1 => base . '1.1:';
  3         4  
  3         145  
88              
89 3     3   13 use constant URN_ASSERTION => saml2 . 'assertion';
  3         5  
  3         180  
90 3     3   30 use constant NS_ASSERTION => 'saml';
  3         6  
  3         179  
91              
92 3     3   16 use constant URN_METADATA => saml2 . 'metadata';
  3         4  
  3         172  
93 3     3   16 use constant NS_METADATA => 'md';
  3         4  
  3         177  
94              
95 3     3   16 use constant URN_PROTOCOL => saml2 . 'protocol';
  3         4  
  3         119  
96 3     3   12 use constant NS_PROTOCOL => 'samlp';
  3         5  
  3         135  
97              
98 3     3   13 use constant URN_SIGNATURE => 'http://www.w3.org/2000/09/xmldsig#';
  3         5  
  3         165  
99 3     3   14 use constant NS_SIGNATURE => 'ds';
  3         5  
  3         143  
100              
101 3     3   19 use constant URN_ENCRYPTION => 'http://www.w3.org/2001/04/xmlenc#';
  3         5  
  3         139  
102 3     3   19 use constant NS_ENCRYPTION => 'xenc';
  3         6  
  3         194  
103              
104 3     3   20 use constant URN_PROTOCOL_ARTIFACT_RESPONSE => URN_PROTOCOL . ':ArtifactResponse';
  3         9  
  3         221  
105 3     3   17 use constant URN_PROTOCOL_LOGOUT_REQUEST => URN_PROTOCOL . ':LogoutRequest';
  3         7  
  3         202  
106 3     3   16 use constant URN_PROTOCOL_RESPONSE => URN_PROTOCOL . ':Response';
  3         5  
  3         167  
107              
108 3     3   13 use constant BINDING_HTTP_POST => saml2 . 'bindings:HTTP-POST';
  3         5  
  3         153  
109 3     3   13 use constant BINDING_HTTP_ARTIFACT => saml2 . 'bindings:HTTP-Artifact';
  3         16  
  3         149  
110 3     3   60 use constant BINDING_HTTP_REDIRECT => saml2 . 'bindings:HTTP-Redirect';
  3         7  
  3         253  
111 3     3   19 use constant BINDING_SOAP => saml2 . 'bindings:SOAP';
  3         5  
  3         221  
112 3     3   16 use constant BINDING_POAS => saml2 . 'bindings:POAS';
  3         4  
  3         128  
113 3     3   11 use constant BINDING_REVERSE_SOAP => BINDING_POAS;
  3         4  
  3         153  
114              
115 3     3   2192 use constant CLASS_UNSPECIFIED => saml2 . 'ac:classes:unspecified';
  3         6  
  3         156  
116 3     3   13 use constant CLASS_PASSWORD_PROTECTED => saml2 . 'ac:classes:PasswordProtectedTransport';
  3         5  
  3         2253  
117 3     3   19 use constant CLASS_M2FA_UNREGISTERED => saml2 . 'ac:classes:MobileTwoFactorUnregistered';
  3         4  
  3         155  
118 3     3   14 use constant CLASS_M2FA_CONTRACT => saml2 . 'ac:classes:MobileTwoFactorContract';
  3         16  
  3         142  
119 3     3   12 use constant CLASS_SMARTCARD => saml2 . 'ac:classes:Smartcard';
  3         5  
  3         144  
120 3     3   13 use constant CLASS_SMARTCARD_PKI => saml2 . 'ac:classes:SmartcardPKI';
  3         5  
  3         194  
121              
122 3     3   13 use constant NAMEID_FORMAT => saml2 . 'nameid-format';
  3         5  
  3         121  
123              
124 3     3   37 use constant NAMEID_EMAIL => saml1_1 . 'nameid-format:emailAddress';
  3         5  
  3         121  
125 3     3   13 use constant NAMEID_UNSPECIFIED => saml1_1 . 'nameid-format:unspecified';
  3         4  
  3         119  
126 3     3   11 use constant NAMEID_X509_SUBJECT_NAME => saml1_1 . 'nameid-format:X509SubjectName';
  3         5  
  3         144  
127 3     3   14 use constant NAMEID_WINDOWS_DOMAIN_QUALIFIED_NAME => saml1_1 . 'nameid-format:WindowsDomainQualifiedName';
  3         4  
  3         125  
128              
129 3     3   12 use constant NAMEID_FORMAT_ENTITY => saml2 . 'nameid-format:entity';
  3         13  
  3         118  
130 3     3   14 use constant NAMEID_KERBEROS => saml2 . 'nameid-format:kerberos';
  3         4  
  3         108  
131 3     3   12 use constant NAMEID_TRANSIENT => saml2 . 'nameid-format:transient';
  3         4  
  3         117  
132 3     3   12 use constant NAMEID_PERSISTENT => saml2 . 'nameid-format:persistent';
  3         4  
  3         128  
133 3     3   12 use constant NAMEID_DEFAULT => NAMEID_UNSPECIFIED;
  3         5  
  3         104  
134 3     3   12 use constant NAMEID_ENTITY => NAMEID_FORMAT_ENTITY;
  3         4  
  3         106  
135              
136              
137 3     3   13 use constant STATUS_AUTH_FAILED => saml2 . 'status:AuthnFailed';
  3         4  
  3         149  
138 3     3   12 use constant STATUS_REQUESTER => saml2 . 'status:Requester';
  3         39  
  3         150  
139 3     3   12 use constant STATUS_REQUEST_DENIED => saml2 . 'status:RequestDenied';
  3         4  
  3         198  
140 3     3   13 use constant STATUS_RESPONDER => saml2 . 'status:Responder';
  3         4  
  3         113  
141 3     3   12 use constant STATUS_SUCCESS => saml2 . 'status:Success';
  3         3  
  3         140  
142 3     3   15 use constant STATUS_PARTIAL_LOGOUT => saml2 . 'status:PartialLogout';
  3         4  
  3         233  
143              
144             1;
145              
146             __END__