Bric::SOAP::Auth(3)

NAME
Bric::SOAP::Auth - module to handle authentication for the SOAP interface

VERSION
$LastChangedRevision$

DATE
$LastChangedDate: 2004-09-14 02:48:55 +0200 (Tue, 14 Sep 2004) $

SYNOPSIS
  # setup soap object
  my $soap = new SOAP::Lite
      uri => 'http://bricolage.sourceforge.net/Bric/SOAP/Auth',
      readable => DEBUG;

  # setup the proxy with a cookie jar to hold the auth cookie
  $soap->proxy('http://localhost/soap',
               cookie_jar => HTTP::Cookies->new(ignore_discard => 1));

  # call the login method
  my $response = $soap->login(name(username => USER),
                              name(password => PASSWORD));

  # switch uri to call methods in other Bric::SOAP classes
  $soap->uri('http://bricolage.sourceforge.net/Bric/SOAP/Story');

DESCRIPTION
This module provides a SOAP login service for Bricolage. Clients call the login() method before calling Bric::SOAP classes and recieve a cookie. Bric::SOAP::Handler validates this cookie using Bric::App::Auth on every request.

INTERFACE

  Public Class Methods

$success = Bric::SOAP::Auth->login(username => $u, password => $p)
    SOAP login method. If login is successful returns 1 and sets an HTTP cookie to be used on future calls to the SOAP interface. On failure returns a fault containing an error message.

    Throws: NONE

    Side Effects: NONE

    Notes:

    Calls Bric::App::Auth::login to check permissions and set the cookie.

AUTHOR
Sam Tregar <stregar@about-inc.com>

SEE ALSO
Bric::SOAP, Bric::SOAP::Handler