I have a soap to authenticate users
<?php
$client = new SoapClient('http://mysite/code/soap.wsdl');
$user = $client->login('username','password');
if( isset($user['IdAccount']) && ($user['IdAccount'] > 0) )
echo 'Logon OK';
else
echo 'Logon Fail!';
I would like to use in Symfony2 without database, only in memory...
I tried to implement a Custom UserProvider, but I do not have all the data needed to make it work...
class WebserviceUserProvider implements UserProviderInterface
{
public function loadUserByUsername($username)
{
$client = new SoapClient('http://mysite/code/soap.wsdl');
$user = $client->login($username, PASSWORD???? );
if ( isset($user['IdAccount']) && ($user['IdAccount'] > 0) )
return new WebserviceUser($username, PASSWORD????, SALT???, ROLES????);
throw new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username)
);
}
I can not change the soap
sorry for my bad english! :(