<?php

namespace AuthStack\Driver\AUDGeneric\App\Requests;

use Illuminate\Foundation\Http\FormRequest;

class Import extends FormRequest
{
    /**
     * @return bool
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * @return array
     */

    public function rules(): array
    {
        return [
            'username' => 'required',
            'password' => 'required',
        ];
    }

    /**
     * @return array
     */
    public function getFormParams(): array
    {
        return [
            'username' => $this->getUsername(),
            'password' => $this->getPass(),
        ];
    }

    /**
     * @return string
     */
    protected function getUsername(): string
    {
        return $this->username;
    }

    /**
     * @return string
     */
    protected function getPass(): string
    {
        return $this->password;
    }
}
