Laravel AT Protocol Client (alpha & unstable)
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update service provider to properly inject dependencies

+12 -1
+12 -1
src/AtpClientServiceProvider.php
··· 3 3 namespace SocialDept\AtpClient; 4 4 5 5 use Illuminate\Support\ServiceProvider; 6 + use SocialDept\AtpClient\Auth\ClientMetadataManager; 6 7 use SocialDept\AtpClient\Auth\DPoPKeyManager; 7 8 use SocialDept\AtpClient\Auth\OAuthEngine; 8 9 use SocialDept\AtpClient\Auth\TokenRefresher; ··· 36 37 }); 37 38 38 39 // Register core services 40 + $this->app->singleton(ClientMetadataManager::class); 39 41 $this->app->singleton(DPoPKeyManager::class); 40 42 $this->app->singleton(TokenRefresher::class); 41 - $this->app->singleton(SessionManager::class); 43 + $this->app->singleton(SessionManager::class, function ($app) { 44 + return new SessionManager( 45 + credentials: $app->make(CredentialProvider::class), 46 + refresher: $app->make(TokenRefresher::class), 47 + dpopManager: $app->make(DPoPKeyManager::class), 48 + keyStore: $app->make(KeyStore::class), 49 + http: $app->make('http'), 50 + refreshThreshold: config('atp-client.session.refresh_threshold', 300), 51 + ); 52 + }); 42 53 $this->app->singleton(OAuthEngine::class); 43 54 44 55 // Register main client facade accessor