Authen::NZRealMe::CommonURIs - Common mappings for tokens to URIs
This module is a central location for defining URIs used across this distribution. The aim of the module is to reduce duplication and possibility of errors.
Many of the URIs are namespace URIs which will be used in reading or writing XML documents. The chosen prefixes for these namespace URIs are arbitrary.
use Authen::NZRealMe::CommonURIs qw(URI NS_PAIR); say URI('ec14n'); # http://www.w3.org/2001/10/xml-exc-c14n# $xc->registerNs( NS_PAIR('ds') );
The following two functions are exported:
Takes a simple string argument (like 'ec14n') which is used as a lookup and returns a URI (like 'http://www.w3.org/2001/10/xml-exc-c14n#').
Will die if there no URI is registered for the supplied token.
Takes a simple string argument (like 'ds') which is used as a lookup and returns a a list of two scalar values: a namespace-prefix => namespace-uri pair for use with XML::LibXML::XPathContext. The supplied argument can be used to look up by namespace prefix or by namespace URI.
After the namespace-prefix => namespace-uri pair have been registered, the supplied prefix value can be used as a namespace prefix in XPath queries.
Will die if the supplied value cannot be used as a prefix to find a URI or as a URI to find a prefix.
The following token/URI mappings are defined. For simplicity, they are all available via both the URI() and the NS_PAIR() functions, although not all the URIs are actually intended to be used as namespaces in XML.
Sources for these URIs:
DSIG_CORE https://www.w3.org/TR/xmldsig-core/#sec-CoreSyntax DSIG_ALG https://www.w3.org/TR/xmldsig-core/#sec-AlgID SAML2 https://wiki.oasis-open.org/security/FrontPage#SAML_V2.0_Standard SOAP11 https://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383494 SOAP12 https://www.w3.org/TR/2007/REC-soap12-part1-20070427/#soapenvelope WSDL https://www.w3.org/TR/wsdl/#nsprefixes WSDL_SOAP http://schemas.xmlsoap.org/wsdl/soap12/soap12WSDL.htm WS_ADDR https://www.w3.org/TR/ws-addr-core/#namespaces WS_TRUST http://docs.oasis-open.org/ws-sx/ws-trust/v1.4/ws-trust.html#_Toc325658925 WS_SEC http://docs.oasis-open.org/wss-m/wss/v1.1.1/os/wss-SOAPMessageSecurity-v1.1.1-os.html#_Toc307407921 WS_SEC2 http://docs.oasis-open.org/wss-m/wss/v1.1.1/os/wss-SOAPMessageSecurity-v1.1.1-os.html#_Toc307407949 XENC https://www.w3.org/TR/xmlenc-core1/ RM_LOGIN https://developers.realme.govt.nz/how-realme-works/ RM_ASSERT https://developers.realme.govt.nz/how-realme-works/ RM_ICMS RealMe iCMS docs
XML Digital Signatures namespace URI. Source: [DSIG_CORE].
Canonical XML 1.0 (omit comments) transform. Source: [DSIG_ALG].
Canonical XML 1.0 (with comments) transform. Source: [DSIG_ALG].
Canonical XML 1.1 (omit comments) transform. Source: [DSIG_ALG].
Canonical XML 1.1 (with comments) transform. Source: [DSIG_ALG].
Exclusive XML Canonicalization 1.0 (omit comments) transform. Source: [DSIG_ALG].
Exclusive XML Canonicalization 1.0 (with comments) transform. Source: [DSIG_ALG].
XML Encryption Syntax and Processing. Source: [XENC].
URI indicating that the encrypted data represents an element. Source: [XENC].
URI for XML Encryption block encryption algorithm "RSAES-PKCS1-v1_5". Source: [XENC].
URI for XML Encryption block encryption algorithm "AES128-CBC". Source: [XENC].
URI for XML Encryption block encryption algorithm "AES256-CBC". Source: [XENC].
URI for XML Encryption key transport encryption algorithm "RSA OAEP MGF1P". Source: [XENC].
URI for XML Encryption key transport encryption algorithm "RSA Version 1.5". Source: [XENC].
SHA1 digest transform. Source: [DSIG_ALG].
SHA256 digest transform. Source: [DSIG_ALG].
Enveloped Signature transform. Source: [DSIG_ALG].
RSA with SHA1 digital signature transform. Source: [DSIG_ALG].
RSA with SHA256 digital signature transform. Source: [DSIG_ALG].
Namespace URI for SOAP version 1.1 elements. Source: [SOAP11].
Namespace URI for SOAP version 1.2 elements. Source: [SOAP12].
Namespace URI for WSDL elements. Source: [WSDL].
Namespace URI for WSDL binding for SOAP version 1.2 elements. Source: [WSDL_SOAP].
Namespace URI for Web Services Addressing elements. Source [WS_ADDR].
Namespace URI for Web Services Addressing metadata elements. Source [WS_ADDR].
URI token to select anonymous addressing. Source [WS_ADDR].
Namespace URI for Web Services Security extension elements. Source [WS_SEC].
Encoding type used for Web Services Security binary security tokens. Source [WS_SEC2].
Identifier type used for Web Services Security SAML2 token type references. Source [WS_SEC2].
Identifier type used for Web Services Security key identifier thumbprint references. Source [WS_SEC2].
Namespace URI for WS-Trust elements. Source [WS_TRUST].
Identifier type used for WS-Trust request type references. Source [WS_TRUST].
Namespace URI for Web Services Security elements. Source [WS_SEC].
Namespace used for SAML 2.0 assertion elements. Source [SAML2].
Namespace used for SAML 2.0 metadata elements. Source [SAML2].
Namespace used for SAML 2.0 protocol elements. Source [SAML2].
Identifier type used for SAML 2.0 binding type references. Source [SAML2].
Identifier type used for SAML 2.0 HTTP-Artifact binding. Source [SAML2].
Identifier type used for SAML 2.0 HTTP-Redirect binding. Source [SAML2].
Identifier type used for SAML 2.0 HTTP-POST binding. Source [SAML2].
Identifier type used for SAML 2.0 response success status references. Source [SAML2].
Identifier type used for SAML 2.0 response failure status references. Source [SAML2].
Identifier type used for SAML 2.0 response 'unknown principal' status references. Source [SAML2].
Identifier type used for SAML 2.0 NameID subject format, unique identifier is retained. Source [SAML2].
Identifier type used for SAML 2.0 NameID subject format, unique identifier for each flow. Source [SAML2].
Identifier type used by RealMe for SAML 2.0 response timeout status references. Source [RM_LOGIN].
Identifier type used by GLS for SAML 2.0 response timeout status references. Source [RM_LOGIN].
Namespace used for party (person) elements in RealMe identity assertions. Source [RM_ASSERT].
Namespace used for locality elements in RealMe identity assertions. Source [RM_ASSERT].
Namespace used for person name elements in RealMe identity assertions. Source [RM_ASSERT].
Namespace used for common types used with elements in RealMe identity assertions. Source [RM_ASSERT].
Namespace used for iCMS AllowCreateFLT elements. Source [RM_ICMS]
To install Authen::NZRealMe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Authen::NZRealMe
CPAN shell
perl -MCPAN -e shell install Authen::NZRealMe
For more information on module installation, please visit the detailed CPAN module installation guide.