mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-23 06:51:27 +00:00
27 lines
776 B
PHP
27 lines
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()
|
|
);
|
|
}
|
|
}
|