Removed service providers

This commit is contained in:
Alex Bilbie 2015-11-13 17:38:48 +00:00
parent 1442842da9
commit 03e4ac7ea6
2 changed files with 0 additions and 66 deletions

View File

@ -1,29 +0,0 @@
<?php
namespace League\OAuth2\Server\ServiceProviders;
use League\Container\ServiceProvider;
use League\OAuth2\Server\Grant\ClientCredentialsGrant;
class ClientCredentialsGrantProvider extends ServiceProvider
{
protected $provides = ['ClientCredentialsGrant'];
/**
* @inheritdoc
*/
public function register()
{
$container = $this->getContainer();
$container->add('ClientCredentialsGrant', function () use ($container) {
$grant = new ClientCredentialsGrant(
$container->get('emitter'),
$container->get('ClientRepository'),
$container->get('ScopeRepository'),
$container->get('AccessTokenRepository')
);
return $grant;
});
}
}

View File

@ -1,37 +0,0 @@
<?php
namespace League\OAuth2\Server\ServiceProviders;
use League\Container\ServiceProvider;
use League\OAuth2\Server\Grant\PasswordGrant;
class PasswordGrantProvider extends ServiceProvider
{
protected $provides = ['PasswordGrant'];
/**
* @inheritdoc
*/
public function register()
{
$container = $this->getContainer();
$container->add('PasswordGrant', function () use ($container) {
$refreshTokenRepository = null;
if ($container->isRegistered('RefreshTokenRepository')) {
$refreshTokenRepository = $container->get('RefreshTokenRepository');
}
$grant = new PasswordGrant(
$container->get('emitter'),
$container->get('ClientRepository'),
$container->get('ScopeRepository'),
$container->get('AccessTokenRepository'),
$container->get('UserRepository'),
$refreshTokenRepository
);
return $grant;
});
}
}