<?php

/*
 * This file is part of the AuthStack project.
 *
 * (c) Buckhill Ltd <development@buckhill.co.uk>
 *
 * This source file is subject to the Buckhill license that is bundled
 * with this source code in the file LICENSE.
 */

namespace AuthStack\SP;

use AuthStack\SP\Helpers\AuthN;
use AuthStack\SP\Helpers\Logout;
use Symfony\Component\HttpFoundation\Request;


if(!function_exists(__NAMESPACE__ . '\authn'))
{
    function authn(array $config, $idp, Request $request = null)
    {
        return new AuthN($config, $idp, $request);
    }
}

if(!function_exists(__NAMESPACE__ .'\logout'))
{
    function logout(array $config, $idp)
    {
        return new Logout($config, $idp);
    }
}

if(!function_exists(__NAMESPACE__ . '\metadata'))
{
    function metadata(array $config)
    {
        return new Metadata($config);
    }
}

