migrator = $migrationService; } /** * Convert Google Auth data to a TwoFAccounts collection * * @param \App\Api\v1\Requests\TwoFAccountImportRequest $request * @return \App\Api\v1\Resources\TwoFAccountCollection */ public function googleAuth(TwoFAccountImportRequest $request) { $request->merge(['withSecret' => true]); $twofaccounts = $this->migrator->migrate($request->uri); return new TwoFAccountCollection($twofaccounts); } /** * Convert Aegis data to a TwoFAccounts collection * * @param \App\Api\v1\Requests\TwoFAccountImportRequest $request * @return \App\Api\v1\Resources\TwoFAccountCollection */ public function aegis(TwoFAccountImportRequest $request) { $request->merge(['withSecret' => true]); $twofaccounts = $this->migrator->migrate($request->uri); return new TwoFAccountCollection($twofaccounts); } }