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


# setup soap object
my $soap = new SOAP::Lite
    uri => '',
    readable => DEBUG;

# setup the proxy with a cookie jar to hold the auth cookie
             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


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.


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


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


Sam Tregar <>

See Also

Bric::SOAP, Bric::SOAP::Handler