<?php
namespace Sil\SilAuth\tests\fakes;

use GuzzleHttp\Psr7\Response;

class FakeSuccessfulIdBroker extends FakeIdBroker
{
    public function getAuthenticatedUser(string $username, string $password)
    {
        $this->logger->info('FAKE SUCCESS: accepting {username} and {password}.', [
            'username' => var_export($username, true),
            'password' => var_export($password, true),
        ]);
        return parent::getAuthenticatedUser($username, $password);
    }
    
    protected function getDesiredResponse()
    {
        return new Response(200, [], json_encode([
            'uuid' => '11111111-aaaa-1111-aaaa-111111111111',
            'employee_id' => '123',
            'first_name' => 'John',
            'last_name' => 'Smith',
            'display_name' => 'John Smith',
            'username' => 'john_smith',
            'email' => 'john_smith@example.com',
            'locked' => 'no'
        ]));
    }
}

<?php
namespace Sil\SilAuth\tests\fakes;

use GuzzleHttp\Psr7\Response;

class FakeSuccessfulIdBroker extends FakeIdBroker
{
    public function getAuthenticatedUser(string $username, string $password)
    {
        $this->logger->info('FAKE SUCCESS: accepting {username} and {password}.', [
            'username' => var_export($username, true),
            'password' => var_export($password, true),
        ]);
        return parent::getAuthenticatedUser($username, $password);
    }
    
    protected function getDesiredResponse()
    {
        return new Response(200, [], json_encode([
            'uuid' => '11111111-aaaa-1111-aaaa-111111111111',
            'employee_id' => '123',
            'first_name' => 'John',
            'last_name' => 'Smith',
            'display_name' => 'John Smith',
            'username' => 'john_smith',
            'email' => 'john_smith@example.com',
            'locked' => 'no',
            'mfa' => [
                'prompt' => 'no',
                'nag' => 'no',
                'options' => [],
            ],
        ]));
    }
}

Add `mfa` entry to fake success response (from Broker).
Add `mfa` entry to fake success response (from Broker).
