<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kglogowski / client-server-communication example snippets
$bundles = [
...
new CSC\CSCBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new FOS\RestBundle\FOSRestBundle(),
];
3. Configure your config.yml
//Example authenticators:
class RestCredentialAuthenticator extends BaseAuthenticator
{
public function getAccessTokenClass(): string
{
return UserAccessToken::class;
}
}
class TokenAuthenticator extends BaseAuthenticator
{
/**
* @return string
*/
public function getAccessTokenClass(): string
{
return UserAccessToken::class;
}
}
class TokenUserProvider extends BaseProvider
{
public function loadUserByUsername($username)
{
//Implement own method from repository
}
public function supportsClass($class)
{
return User::class === $class;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.