firefly-iii/app/Http/Requests/TokenFormRequest.php

38 lines
525 B
PHP
Raw Normal View History

2016-03-03 13:45:27 -06:00
<?php
declare(strict_types = 1);
namespace FireflyIII\Http\Requests;
use Auth;
/**
* Class TokenFormRequest
*
*
* @package FireflyIII\Http\Requests
*/
class TokenFormRequest extends Request
{
/**
* @return bool
*/
public function authorize()
{
// Only allow logged in users
return Auth::check();
}
/**
* @return array
*/
public function rules()
{
$rules = [
2016-03-19 10:51:52 -05:00
'code' => 'required|2faCode',
2016-03-03 13:45:27 -06:00
];
return $rules;
}
}