1VOMS::Lite::SAMLHelper(U3s)er Contributed Perl DocumentatViOoMnS::Lite::SAMLHelper(3)
2
3
4
6 VOMS::Lite::SAMLHelper - Perl extension for SAML
7
9 use VOMS::Lite::SAMLHelper;
10 %DATA = %{ VOMS::Lite::SAMLHelper::parseSAML($saml) };
11
13 VOMS::Lite::SAMLHelper is designed to parse SAML 1 and 2 assertion and
14 protocol statements for SARoNGS. The library exposes two functions
15 which may be of use.
16
17 parseSAML
18
19 Expects serialised xml (saml) on in $_[0].
20 Called in scalar context returns 1 if successfully parsed 0 otherwise.
21 Called in array context returns a copy of the parsed object array.
22 If $_[1] is set to an array reference this is used to prime
23 and pass the parsed object array back.
24
25 Creates new XML::Parser
26 Uses getNode to abstractly parse root node
27 Uses parseElement to parse this abstract root node
28
29 Parsed object is represented as an array of XPath-like data stings
30 (one array element per data value i.e. may contain \n).
31
32 e.g.
33 /path/to/node (namespace)
34 /path/to/node{attribute} (attribute.namespace.if.any) = attributevalue
35 ...
36 /path/to/node TextContentIfAny
37 /path/to/node/subnode (namesapce)
38 /path/to/node/subnode{attribute} (attribute.namespace.if.any) = attributevalue
39 ...
40 /path/to/node/subnode TextContentIfAny
41 /path/to/node/subnode/subsubnode...
42 /path/to/node2 (namespace)
43 ...
44
45 namespaces will be consumed and returned only in parenthase
46
47 getSAMLAttributes
48
49 Expects serialised xml (saml) on in $_[0].
50
51 return {
52 Attributes=>{ (FriendlyName|Name)=Value, ...},
53 ResponseID=>$ResponseID,
54 Status=>$StatusCodeValue,
55 NotOnOrAfter=>$NotOnOrAfter,
56 NotBefore=>$NotBefore,
57 Subject=>$NameIdentifier,
58 Warnings=> [Anonymous array of warnings]
59 };
60
61 EXPORT
62 None by default;
63
65 http://saml.xml.org/saml-specifications
66
67 This module was originally designed for the SARoNGS service Hosted by
68 the The University of Manchester on behalf of the UK NGS.
69
70 Mailing list, voms-lite@listserv.manchester.ac.uk
71
73 Mike Jones <mike.jones@manchester.ac.uk>
74
76 Copyright (C) 2012 by Mike Jones
77
78 This library is free software; you can redistribute it and/or modify it
79 under the same terms as Perl itself, either Perl version 5.8.3 or, at
80 your option, any later version of Perl 5 you may have available.
81
82
83
84perl v5.34.0 2021-07-27 VOMS::Lite::SAMLHelper(3)