app->singleton(ClientRepository::class, CachedPersonalAccessClientRepository::class); } /** * Make the authorization service instance. */ public function makeAuthorizationServer(?ResponseTypeInterface $responseType = null): AuthorizationServer { return tap(new AuthorizationServer( $this->app->make(Bridge\ClientRepository::class), $this->app->make(Bridge\AccessTokenRepository::class), $this->app->make(ScopeRepository::class), $this->makeCryptKey('private'), Passport::tokenEncryptionKey($this->app->make('encrypter')), $responseType ?? Passport::$authorizationServerResponseType ), function (AuthorizationServer $server): void { $server->setDefaultScope(Passport::$defaultScope); $server->revokeRefreshTokens(Passport::$revokeRefreshTokenAfterUse); }); } }