serverRepository = $serverRepository; } /** * @param \Pterodactyl\Models\User $user * @return \Webauthn\PublicKeyCredentialRequestOptions */ public function handle(User $user): PublicKeyCredentialRequestOptions { $credentials = $user->securityKeys->map(function (SecurityKey $key) { return $key->getPublicKeyCredentialDescriptor(); }); $response = $this->serverRepository->getServer($user) ->generatePublicKeyCredentialRequestOptions( PublicKeyCredentialRequestOptions::USER_VERIFICATION_REQUIREMENT_PREFERRED, $credentials ); return $response->setTimeout(300); } }