mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-26 15:01:54 +02:00
Fix pint issues
This commit is contained in:
parent
ad43aa777b
commit
e624995ebc
@ -131,8 +131,7 @@ class GroupController extends Controller
|
|||||||
// are not assigned to any group record.
|
// are not assigned to any group record.
|
||||||
if ($group->id === 0) {
|
if ($group->id === 0) {
|
||||||
$twofaccounts = $request->user()->twofaccounts;
|
$twofaccounts = $request->user()->twofaccounts;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$twofaccounts = $group->twofaccounts;
|
$twofaccounts = $group->twofaccounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class GroupStoreRequest extends FormRequest
|
|||||||
*
|
*
|
||||||
* @return array<string, string>
|
* @return array<string, string>
|
||||||
*/
|
*/
|
||||||
public function messages(): array
|
public function messages() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name.not_in' => __('errors.reserved_name_please_choose_something_else'),
|
'name.not_in' => __('errors.reserved_name_please_choose_something_else'),
|
||||||
|
@ -28,7 +28,7 @@ class SinglePageController extends Controller
|
|||||||
$publicSettings = $appSettings->only([
|
$publicSettings = $appSettings->only([
|
||||||
'disableRegistration',
|
'disableRegistration',
|
||||||
'enableSso',
|
'enableSso',
|
||||||
'useSsoOnly'
|
'useSsoOnly',
|
||||||
]);
|
]);
|
||||||
$settings = $appSettings->map(function (mixed $item, string $key) {
|
$settings = $appSettings->map(function (mixed $item, string $key) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -117,8 +117,7 @@ class Group extends Model
|
|||||||
$group->id = 0;
|
$group->id = 0;
|
||||||
|
|
||||||
return $group;
|
return $group;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return parent::resolveRouteBinding($value, $field);
|
return parent::resolveRouteBinding($value, $field);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -431,12 +431,10 @@ class TwoFAccount extends Model implements Sortable
|
|||||||
$OtpDto->otp_type = $this->otp_type;
|
$OtpDto->otp_type = $this->otp_type;
|
||||||
$OtpDto->generated_at = $time ?: time();
|
$OtpDto->generated_at = $time ?: time();
|
||||||
$expires_in = $this->generator->expiresIn(); /** @phpstan-ignore-line - expiresIn() is in the TOTPInterface only */
|
$expires_in = $this->generator->expiresIn(); /** @phpstan-ignore-line - expiresIn() is in the TOTPInterface only */
|
||||||
|
|
||||||
if ($this->otp_type === self::TOTP) {
|
if ($this->otp_type === self::TOTP) {
|
||||||
$OtpDto->password = $this->generator->at($OtpDto->generated_at);
|
$OtpDto->password = $this->generator->at($OtpDto->generated_at);
|
||||||
$OtpDto->next_password = $this->generator->at($OtpDto->generated_at + $expires_in + 2);
|
$OtpDto->next_password = $this->generator->at($OtpDto->generated_at + $expires_in + 2);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$OtpDto->password = SteamTotp::getAuthCode(base64_encode(Base32::decodeUpper($this->secret)));
|
$OtpDto->password = SteamTotp::getAuthCode(base64_encode(Base32::decodeUpper($this->secret)));
|
||||||
$OtpDto->next_password = SteamTotp::getAuthCode(base64_encode(Base32::decodeUpper($this->secret)), $expires_in + 2);
|
$OtpDto->next_password = SteamTotp::getAuthCode(base64_encode(Base32::decodeUpper($this->secret)), $expires_in + 2);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user