Mark Overmeer > XML-Compile-WSS-1.00 > XML::Compile::WSS::BasicAuth

Download:
XML-Compile-WSS-1.00.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.00   Source   Latest Release: XML-Compile-WSS-1.12

NAME ^

XML::Compile::WSS::BasicAuth - username/password security

INHERITANCE ^

 XML::Compile::WSS::BasicAuth
   is a XML::Compile::WSS

SYNOPSIS ^

 # used in combination with anything
 my $auth = XML::Compile::WSS::BasicAuth->new
   ( schema   => $anything
   , username => $user
   , password => $password
   );

 # connects itself to a WSDL
 my $wss  = XML::Compile::SOAP::WSS->new;
 my $wsdl = XML::Compile::WSDL11->new($wsdlfn);
 my $auth = $wss->basicAuth
   ( ... same params, except 'schema'
   );

DESCRIPTION ^

The generic Web Service Security protocol is implemented by the super class XML::Compile::WSS. This extension implements basic authentication.

METHODS ^

Constructors

XML::Compile::WSS::BasicAuth->new(OPTIONS)
 -Option     --Defined in     --Default
  created                       undef
  nonce                         'RANDOM'
  password                      <required>
  pwformat                      UTP11_PTEXT
  schema       XML::Compile::WSS  undef
  username                      <required>
  version      XML::Compile::WSS  undef
  wss_version  XML::Compile::WSS  '1.1'
  wsu_Id                        undef
created => DATETIME

See XML::Compile::WSS::dateTime() for choices of DATETIME.

nonce => STRING|CODE|'RANDOM'

Only used then the password is passed as digest. This will cause an extra child to be added to the UsernameToken, namely

  <wsse:Nonce>$enc</wsse:Nonce>

where $enc is the base64-encoding of the STRING. The STRING will be prepended to the password (and to any "created" information) before the digest is computed to make each digest unique.

When you pass a CODE, it will get called for each message to produce a STRING. The constant text 'RANDOM' will have a random nonce generator being called at each message.

password => STRING
pwformat => UTP11_PTEXT|UTP11_PDIGEST

With UTP11_PTEXT, the plain-text version of the password is shown. If PTWTYPE IS UTP11_PDIGEST, the plain-text password will be encrypted with SHA1. The OPTIONS can be used to salt the digest with "nonce" and/or "created" information before the encryption.

schema => XML::Compile::Cache
username => STRING
version => STRING
wss_version => '1.1'|MODULE
wsu_Id => STRING

Adds a wsu:Id attribute to the created element.

Attributes

$obj->created()
$obj->nonce()
$obj->password()
$obj->schema()

See "Attributes" in XML::Compile::WSS

$obj->username()
$obj->version()

See "Attributes" in XML::Compile::WSS

$obj->wsuId()

Internals

$obj->dateTime(TIME|STRING|HASH)

See "Internals" in XML::Compile::WSS

XML::Compile::WSS::BasicAuth->loadSchemas(SCHEMA, VERSION)

See "Internals" in XML::Compile::WSS

SEE ALSO

SEE ALSO ^

This module is part of XML-Compile-WSS distribution version 1.00, built on October 16, 2012. Website: http://perl.overmeer.net/xml-compile/

Other distributions in this suite: XML::Compile, XML::Compile::SOAP, XML::Compile::SOAP12, XML::Compile::SOAP::Daemon, XML::Compile::SOAP::WSA, XML::Compile::C14N, XML::Compile::WSS, XML::Compile::Tester, XML::Compile::Cache, XML::Compile::Dumper, XML::Compile::RPC, XML::Rewrite, XML::eXistDB, and XML::LibXML::Simple.

Please post questions or ideas to the mailinglist at http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile For live contact with other developers, visit the #xml-compile channel on irc.perl.org.

LICENSE ^

Copyrights 2011-2012 by [Mark Overmeer]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

syntax highlighting: