فهرست منبع

Add steamtotp to validation requests

Bubka 3 سال پیش
والد
کامیت
c998356ba5
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      app/Api/v1/Requests/TwoFAccountStoreRequest.php
  2. 1 1
      app/Api/v1/Requests/TwoFAccountUpdateRequest.php

+ 1 - 1
app/Api/v1/Requests/TwoFAccountStoreRequest.php

@@ -28,7 +28,7 @@ class TwoFAccountStoreRequest extends FormRequest
             'service' => 'nullable|string|regex:/^[^:]+$/i',
             'service' => 'nullable|string|regex:/^[^:]+$/i',
             'account' => 'required|string|regex:/^[^:]+$/i',
             'account' => 'required|string|regex:/^[^:]+$/i',
             'icon' => 'nullable|string',
             'icon' => 'nullable|string',
-            'otp_type' => 'required|string|in:totp,hotp',
+            'otp_type' => 'required|string|in:totp,hotp,steamtotp',
             'secret' => ['string', 'bail', new \App\Rules\IsBase32Encoded],
             'secret' => ['string', 'bail', new \App\Rules\IsBase32Encoded],
             'digits' => 'nullable|integer|between:6,10',
             'digits' => 'nullable|integer|between:6,10',
             'algorithm' => 'nullable|string|in:sha1,sha256,sha512,md5',
             'algorithm' => 'nullable|string|in:sha1,sha256,sha512,md5',

+ 1 - 1
app/Api/v1/Requests/TwoFAccountUpdateRequest.php

@@ -28,7 +28,7 @@ class TwoFAccountUpdateRequest extends FormRequest
             'service' => 'present|nullable|string|regex:/^[^:]+$/i',
             'service' => 'present|nullable|string|regex:/^[^:]+$/i',
             'account' => 'required|string|regex:/^[^:]+$/i',
             'account' => 'required|string|regex:/^[^:]+$/i',
             'icon' => 'present|nullable|string',
             'icon' => 'present|nullable|string',
-            'otp_type' => 'required|string|in:totp,hotp',
+            'otp_type' => 'required|string|in:totp,hotp,steamtotp',
             'secret' => ['present', 'string', 'bail', new \App\Rules\IsBase32Encoded],
             'secret' => ['present', 'string', 'bail', new \App\Rules\IsBase32Encoded],
             'digits' => 'present|integer|between:6,10',
             'digits' => 'present|integer|between:6,10',
             'algorithm' => 'present|string|in:sha1,sha256,sha512,md5',
             'algorithm' => 'present|string|in:sha1,sha256,sha512,md5',