Oauth::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 2
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Gateway Class
6
 * @category    Ticaje
7
 * @author      Max Demian <[email protected]>
8
 */
9
10
namespace Ticaje\AConnector\Gateway\Provider\Authentication;
11
12
use Ticaje\Contract\Factory\FactoryInterface;
13
14
use Ticaje\AConnector\Interfaces\Provider\Authentication\AuthenticatorInterface;
15
use Ticaje\AConnector\Interfaces\Provider\Authentication\OAuthInterface;
16
17
/**
18
 * Class Oauth
19
 * @package Ticaje\AConnector\Gateway\Provider\Authentication
20
 * This class is held responsible for housing the service contract when it comes to Oauth logic
21
 * The specific implementations of each Oauth related domain belong to each domain
22
 * The only condition for every domain is to be compliant with this class dependencies
23
 */
24
abstract class Oauth implements AuthenticatorInterface, OAuthInterface
25
{
26
    protected $oauthClientFactory;
27
28
    protected $oauthClient;
29
30
    protected $clientCredentialsFactory;
31
32
    protected $credentialsClient;
33
34
    protected $credentials;
35
36
    protected $options;
37
38
    /**
39
     * Oauth constructor.
40
     * @param $oauthClientFactory
41
     * @param $clientCredentialsFactory
42
     */
43
    public function __construct(
44
        FactoryInterface $oauthClientFactory,
45
        FactoryInterface $clientCredentialsFactory
46
    ) {
47
        $this->oauthClientFactory = $oauthClientFactory;
48
        $this->clientCredentialsFactory = $clientCredentialsFactory;
49
    }
50
}
51