5959use Webauthn \PublicKeyCredentialLoader ;
6060use Webauthn \PublicKeyCredentialRpEntity ;
6161use Webauthn \PublicKeyCredentialSourceRepository ;
62- use Webauthn \TokenBinding \IgnoreTokenBindingHandler ;
63- use Webauthn \TokenBinding \TokenBindingHandler ;
6462
6563class WebauthnServiceProvider extends ServiceProvider
6664{
@@ -138,7 +136,6 @@ public function registerResponseBindings()
138136 protected function bindWebAuthnPackage (): void
139137 {
140138 $ this ->app ->bind (PublicKeyCredentialSourceRepository::class, CredentialRepository::class);
141- $ this ->app ->bind (TokenBindingHandler::class, IgnoreTokenBindingHandler::class);
142139
143140 $ this ->app ->bind (
144141 PackedAttestationStatementSupport::class,
@@ -184,10 +181,11 @@ protected function bindWebAuthnPackage(): void
184181 );
185182 $ this ->app ->bind (
186183 AttestationObjectLoader::class,
187- fn ($ app ) => (new AttestationObjectLoader (
184+ fn ($ app ) => tap (new AttestationObjectLoader (
188185 $ app [AttestationStatementSupportManager::class]
189- ))
190- ->setLogger ($ app ['log ' ])
186+ ), function ($ loader ) use ($ app ) {
187+ $ loader ->setLogger ($ app ['log ' ]);
188+ })
191189 );
192190
193191 $ this ->app ->bind (
@@ -197,24 +195,26 @@ protected function bindWebAuthnPackage(): void
197195
198196 $ this ->app ->bind (
199197 AuthenticatorAttestationResponseValidator::class,
200- fn ($ app ) => (new AuthenticatorAttestationResponseValidator (
198+ fn ($ app ) => tap (new AuthenticatorAttestationResponseValidator (
201199 $ app [AttestationStatementSupportManager::class],
202200 $ app [PublicKeyCredentialSourceRepository::class],
203- $ app [TokenBindingHandler::class] ,
201+ null ,
204202 $ app [ExtensionOutputCheckerHandler::class]
205- ))
206- ->setLogger ($ app ['log ' ])
203+ ), function ($ responseValidator ) use ($ app ) {
204+ $ responseValidator ->setLogger ($ app ['log ' ]);
205+ })
207206 );
208207 $ this ->app ->bind (
209208 AuthenticatorAssertionResponseValidator::class,
210- fn ($ app ) => (new AuthenticatorAssertionResponseValidator (
209+ fn ($ app ) => tap (new AuthenticatorAssertionResponseValidator (
211210 $ app [PublicKeyCredentialSourceRepository::class],
212- $ app [TokenBindingHandler::class] ,
211+ null ,
213212 $ app [ExtensionOutputCheckerHandler::class],
214213 $ app [CoseAlgorithmManager::class]
215- ))
216- ->setCounterChecker ($ app [CounterChecker::class])
217- ->setLogger ($ app ['log ' ])
214+ ), function ($ responseValidator ) use ($ app ) {
215+ $ responseValidator ->setCounterChecker ($ app [CounterChecker::class])
216+ ->setLogger ($ app ['log ' ]);
217+ })
218218 );
219219 $ this ->app ->bind (
220220 AuthenticatorSelectionCriteria::class,
@@ -239,10 +239,11 @@ protected function bindWebAuthnPackage(): void
239239 );
240240 $ this ->app ->bind (
241241 PublicKeyCredentialLoader::class,
242- fn ($ app ) => (new PublicKeyCredentialLoader (
242+ fn ($ app ) => tap (new PublicKeyCredentialLoader (
243243 $ app [AttestationObjectLoader::class]
244- ))
245- ->setLogger ($ app ['log ' ])
244+ ), function ($ loader ) use ($ app ) {
245+ $ loader ->setLogger ($ app ['log ' ]);
246+ })
246247 );
247248
248249 $ this ->app ->bind (
0 commit comments