|
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\Glue\GlueStorefrontApiApplication; |
|
9
|
|
|
|
|
10
|
|
|
use Spryker\Glue\GlueStorefrontApiApplication\GlueStorefrontApiApplicationDependencyProvider as SprykerGlueStorefrontApiApplicationDependencyProvider; |
|
11
|
|
|
use Spryker\Glue\GlueStorefrontApiApplication\Plugin\GlueApplication\ApplicationIdentifierRequestBuilderPlugin; |
|
12
|
|
|
use Spryker\Glue\GlueStorefrontApiApplication\Plugin\GlueApplication\LocaleRequestBuilderPlugin; |
|
13
|
|
|
use Spryker\Glue\GlueStorefrontApiApplication\Plugin\GlueApplication\RequestCorsValidatorPlugin; |
|
14
|
|
|
use Spryker\Glue\GlueStorefrontApiApplication\Plugin\GlueApplication\ScopeRequestAfterRoutingValidatorPlugin; |
|
15
|
|
|
use Spryker\Glue\GlueStorefrontApiApplication\Plugin\GlueApplication\SecurityHeaderResponseFormatterPlugin; |
|
16
|
|
|
use Spryker\Glue\GlueStorefrontApiApplicationAuthorizationConnector\Plugin\GlueStorefrontApiApplicationAuthorizationConnector\AuthorizationRequestAfterRoutingValidatorPlugin; |
|
17
|
|
|
use Spryker\Glue\OauthApi\Plugin\AccessTokenValidatorPlugin; |
|
18
|
|
|
use Spryker\Glue\OauthApi\Plugin\CustomerRequestBuilderPlugin; |
|
19
|
|
|
use Spryker\Glue\OauthApi\Plugin\GlueApplication\CustomerRequestValidatorPlugin; |
|
20
|
|
|
use Spryker\Glue\OauthApi\Plugin\GlueApplication\OauthApiTokenResource; |
|
21
|
|
|
|
|
22
|
|
|
class GlueStorefrontApiApplicationDependencyProvider extends SprykerGlueStorefrontApiApplicationDependencyProvider |
|
23
|
|
|
{ |
|
24
|
|
|
/** |
|
25
|
|
|
* @return array<\Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\RequestBuilderPluginInterface> |
|
26
|
|
|
*/ |
|
27
|
|
|
protected function getRequestBuilderPlugins(): array |
|
28
|
|
|
{ |
|
29
|
|
|
return [ |
|
30
|
|
|
new ApplicationIdentifierRequestBuilderPlugin(), |
|
31
|
|
|
new LocaleRequestBuilderPlugin(), |
|
32
|
|
|
new CustomerRequestBuilderPlugin(), |
|
33
|
|
|
]; |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* @return array<\Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\RequestValidatorPluginInterface> |
|
38
|
|
|
*/ |
|
39
|
|
|
protected function getRequestValidatorPlugins(): array |
|
40
|
|
|
{ |
|
41
|
|
|
return [ |
|
42
|
|
|
new AccessTokenValidatorPlugin(), |
|
43
|
|
|
new CustomerRequestValidatorPlugin(), |
|
44
|
|
|
]; |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* @return array<\Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\RequestAfterRoutingValidatorPluginInterface> |
|
49
|
|
|
*/ |
|
50
|
|
|
protected function getRequestAfterRoutingValidatorPlugins(): array |
|
51
|
|
|
{ |
|
52
|
|
|
return [ |
|
53
|
|
|
new RequestCorsValidatorPlugin(), |
|
54
|
|
|
new ScopeRequestAfterRoutingValidatorPlugin(), |
|
55
|
|
|
new AuthorizationRequestAfterRoutingValidatorPlugin(), |
|
56
|
|
|
]; |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* @return array<\Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\ResponseFormatterPluginInterface> |
|
61
|
|
|
*/ |
|
62
|
|
|
protected function getResponseFormatterPlugins(): array |
|
63
|
|
|
{ |
|
64
|
|
|
return [ |
|
65
|
|
|
new SecurityHeaderResponseFormatterPlugin(), |
|
66
|
|
|
]; |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* @return array<\Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\ResourceInterface> |
|
71
|
|
|
*/ |
|
72
|
|
|
protected function getResourcePlugins(): array |
|
73
|
|
|
{ |
|
74
|
|
|
return [ |
|
75
|
|
|
new OauthApiTokenResource(), |
|
76
|
|
|
]; |
|
77
|
|
|
} |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* @return array<\Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\RouteProviderPluginInterface> |
|
81
|
|
|
*/ |
|
82
|
|
|
protected function getRouteProviderPlugins(): array |
|
83
|
|
|
{ |
|
84
|
|
|
return []; |
|
85
|
|
|
} |
|
86
|
|
|
} |
|
87
|
|
|
|