Passed
Pull Request — master (#62)
by Michael
15:25
created

OauthDependencyProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 7
dl 0
loc 29
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getKeyLoaderPlugins() 0 4 1
A getAccessTokenValidatorPlugins() 0 4 1
A getAuthorizationValidatorPlugins() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace Pyz\Client\Oauth;
9
10
use Spryker\Client\Oauth\OauthDependencyProvider as SprykerOauthDependencyProvider;
11
use Spryker\Client\OauthCryptography\Communication\Plugin\Oauth\BearerTokenAuthorizationValidatorPlugin;
12
use Spryker\Client\OauthCryptography\Communication\Plugin\Oauth\FileSystemKeyLoaderPlugin;
13
use Spryker\Client\OauthCustomerValidation\Plugin\Oauth\ValidateInvalidatedCustomerAccessTokenValidatorPlugin;
14
15
class OauthDependencyProvider extends SprykerOauthDependencyProvider
16
{
17
    /**
18
     * @return array<\Spryker\Client\OauthExtension\Dependency\Plugin\KeyLoaderPluginInterface>
19
     */
20
    protected function getKeyLoaderPlugins(): array
21
    {
22
        return [
23
            new FileSystemKeyLoaderPlugin(),
24
        ];
25
    }
26
27
    /**
28
     * @return array<\Spryker\Client\OauthExtension\Dependency\Plugin\AuthorizationValidatorPluginInterface>
29
     */
30
    protected function getAuthorizationValidatorPlugins(): array
31
    {
32
        return [
33
            new BearerTokenAuthorizationValidatorPlugin(),
34
        ];
35
    }
36
37
    /**
38
     * @return array<\Spryker\Client\OauthExtension\Dependency\Plugin\AccessTokenValidatorPluginInterface>
39
     */
40
    protected function getAccessTokenValidatorPlugins(): array
41
    {
42
        return [
43
            new ValidateInvalidatedCustomerAccessTokenValidatorPlugin(),
44
        ];
45
    }
46
}
47