Name

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

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