has('otpauth') && $request->boolean('otpauth') ? [ 'uri' => urldecode($this->getURI()), ] : [ 'otp_type' => $this->otp_type, 'account' => $this->account, 'service' => $this->service, 'icon' => $this->icon, 'icon_mime' => $this->icon && IconStore::exists($this->icon) ? IconStore::mimeType($this->icon) : null, 'icon_file' => $this->icon && IconStore::exists($this->icon) ? base64_encode(IconStore::get($this->icon)) : null, 'secret' => $this->secret, 'digits' => (int) $this->digits, 'algorithm' => $this->algorithm, 'period' => is_null($this->period) ? null : (int) $this->period, 'counter' => is_null($this->counter) ? null : (int) $this->counter, 'legacy_uri' => $this->legacy_uri, ]; } }