Mike Jones > VOMS-Lite-0.20 > VOMS::Lite::SAMLHelper

Download:
VOMS-Lite-0.20.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.20   Source  

NAME ^

VOMS::Lite::SAMLHelper - Perl extension for SAML

SYNOPSIS ^

  use VOMS::Lite::SAMLHelper;
  %DATA = %{ VOMS::Lite::SAMLHelper::parseSAML($saml) };

DESCRIPTION ^

VOMS::Lite::SAMLHelper is designed to parse SAML 1 and 2 assertion and protocol statements for SARoNGS. The library exposes two functions which may be of use.

parseSAML

  Expects serialised xml (saml) on in $_[0].
  Called in scalar context returns 1 if successfully parsed 0 otherwise.
  Called in array context returns a copy of the parsed object array.
  If $_[1] is set to an array reference this is used to prime 
  and pass the parsed object array back.

  Creates new XML::Parser
  Uses getNode to abstractly parse root node
  Uses parseElement to parse this abstract root node

  Parsed object is represented as an array of XPath-like data stings
  (one array element per data value i.e. may contain \n).

  e.g.
  /path/to/node (namespace)
  /path/to/node{attribute} (attribute.namespace.if.any) = attributevalue
  ...
  /path/to/node TextContentIfAny
  /path/to/node/subnode (namesapce)
  /path/to/node/subnode{attribute} (attribute.namespace.if.any) = attributevalue
  ...
  /path/to/node/subnode TextContentIfAny
  /path/to/node/subnode/subsubnode...
  /path/to/node2 (namespace)
  ...

  namespaces will be consumed and returned only in parenthase

getSAMLAttributes

  Expects serialised xml (saml) on in $_[0].

  return {
      Attributes=>{ (FriendlyName|Name)=Value, ...},
      ResponseID=>$ResponseID,
      Status=>$StatusCodeValue,
      NotOnOrAfter=>$NotOnOrAfter,
      NotBefore=>$NotBefore,
      Subject=>$NameIdentifier,
      Warnings=> [Anonymous array of warnings]
    };

EXPORT

None by default;

SEE ALSO ^

http://saml.xml.org/saml-specifications

This module was originally designed for the SARoNGS service Hosted by the The University of Manchester on behalf of the UK NGS.

Mailing list, voms-lite@listserv.manchester.ac.uk

AUTHOR ^

Mike Jones <mike.jones@manchester.ac.uk>

COPYRIGHT AND LICENSE ^

Copyright (C) 2012 by Mike Jones

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: