in reply to
Re: Authentication and Authorization for SOAP
in thread Authentication and Authorization for SOAP
A common practice is to pass authentication information in the SOAP headers. With SOAP::Lite, you can do this by creating SOAP::Header objects (just like SOAP::Data, but they'll be placed in the header):
my $headers = SOAP::Header
->name( 'LoginCredentials' )
->value( [
SOAP::Header
->name('Username')
->value( $username )
,
SOAP::Header
->name('Password')
->value( $password )
,
]
)
)
;
The login credentials can then be passed along with any other arguments into whatever SOAP method is being called, and dealt with seperately.