<?php
declare(strict_types=1);

/**
 * BEdita, API-first content management framework
 * Copyright 2016 ChannelWeb Srl, Chialab Srl
 *
 * This file is part of BEdita: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * See LICENSE.LGPL or <http://gnu.org/licenses/lgpl-3.0.html> for more details.
 */
namespace BEdita\Core\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

/**
 * Fixture for `auth_providers` table.
 */
class AuthProvidersFixture extends TestFixture
{
    /**
     * @inheritDoc
     */
    public $records = [
        // 1
        [
            'name' => 'example',
            'auth_class' => 'BEdita/API.OAuth2',
            'url' => 'https://example.com/oauth2',
            'params' => ['provider_username_field' => 'owner_id'],
            'enabled' => true,
            'created' => '2018-04-07 12:51:27',
            'modified' => '2018-04-07 12:51:27',
        ],
        // 2
        [
            'name' => 'uuid',
            'auth_class' => 'BEdita/API.Uuid',
            'url' => null,
            'params' => ['status' => 'on'],
            'enabled' => true,
            'created' => '2018-04-07 12:51:27',
            'modified' => '2018-04-07 12:51:27',
        ],
        // 3
        [
            'name' => 'linkedout',
            'auth_class' => 'BEdita/API.OAuth2',
            'url' => 'https://out.example.com/oauth2',
            'params' => ['provider_username_field' => 'owner_id'],
            'enabled' => false,
            'created' => '2018-04-07 12:51:27',
            'modified' => '2018-04-07 12:51:27',
        ],
        // 4
        [
            'name' => 'otp',
            'auth_class' => 'BEdita/API.OTP',
            'url' => null,
            'params' => ['expiry' => '+5 minutes'],
            'enabled' => true,
            'created' => '2018-04-07 12:51:27',
            'modified' => '2018-04-07 12:51:27',
        ],
    ];
}
