|
@@ -23,10 +23,10 @@ class TwoFAccountStoreResource extends JsonResource
|
|
!$request->has('withSecret') || (int) filter_var($request->input('withSecret'), FILTER_VALIDATE_BOOLEAN) == 1,
|
|
!$request->has('withSecret') || (int) filter_var($request->input('withSecret'), FILTER_VALIDATE_BOOLEAN) == 1,
|
|
$this->secret
|
|
$this->secret
|
|
),
|
|
),
|
|
- 'digits' => $this->digits,
|
|
|
|
|
|
+ 'digits' => (int) $this->digits,
|
|
'algorithm' => $this->algorithm,
|
|
'algorithm' => $this->algorithm,
|
|
- 'period' => $this->period,
|
|
|
|
- 'counter' => $this->counter
|
|
|
|
|
|
+ 'period' => is_null($this->period) ? null : (int)$this->period,
|
|
|
|
+ 'counter' => is_null($this->counter) ? null : (int)$this->counter
|
|
];
|
|
];
|
|
}
|
|
}
|
|
}
|
|
}
|