kopia lustrzana https://github.com/pixelfed/pixelfed
28 wiersze
776 B
PHP
28 wiersze
776 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Auth\BearerTokenResponse;
|
|
use Laravel\Passport\Bridge;
|
|
use League\OAuth2\Server\AuthorizationServer;
|
|
|
|
class PassportServiceProvider extends \Laravel\Passport\PassportServiceProvider
|
|
{
|
|
/**
|
|
* Make the authorization service instance.
|
|
*
|
|
* @return \League\OAuth2\Server\AuthorizationServer
|
|
*/
|
|
public function makeAuthorizationServer()
|
|
{
|
|
return new AuthorizationServer(
|
|
$this->app->make(Bridge\ClientRepository::class),
|
|
$this->app->make(Bridge\AccessTokenRepository::class),
|
|
$this->app->make(Bridge\ScopeRepository::class),
|
|
$this->makeCryptKey('private'),
|
|
app('encrypter')->getKey(),
|
|
new BearerTokenResponse()
|
|
);
|
|
}
|
|
}
|