1 | <?php |
||
15 | class Magento2 extends AbstractService |
||
16 | { |
||
17 | /** @var string|null */ |
||
18 | protected $oauthVerifier = null; |
||
19 | |||
20 | public function __construct( |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | public function getRequestTokenEndpoint() |
||
39 | |||
40 | /** |
||
41 | * Returns the authorization API endpoint. |
||
42 | * |
||
43 | * @throws \OAuth\Common\Exception\Exception |
||
44 | */ |
||
45 | public function getAuthorizationEndpoint() |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public function getAccessTokenEndpoint() |
||
61 | |||
62 | /** |
||
63 | * Parses the request token response and returns a TokenInterface. |
||
64 | * |
||
65 | * @param string $responseBody |
||
66 | * @return TokenInterface |
||
67 | * @throws TokenResponseException |
||
68 | */ |
||
69 | protected function parseRequestTokenResponse($responseBody) |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | protected function parseAccessTokenResponse($responseBody) |
||
85 | |||
86 | /** |
||
87 | * Parse response body and create oAuth token object based on parameters provided. |
||
88 | * |
||
89 | * @param string $responseBody |
||
90 | * @return StdOAuth1Token |
||
91 | * @throws TokenResponseException |
||
92 | */ |
||
93 | protected function parseToken($responseBody) |
||
106 | |||
107 | /** |
||
108 | * Parse response body and return data in array. |
||
109 | * |
||
110 | * @param string $responseBody |
||
111 | * @return array |
||
112 | * @throws TokenResponseException |
||
113 | */ |
||
114 | protected function parseResponseBody($responseBody) |
||
127 | |||
128 | /** |
||
129 | * Builds the authorization header for an authenticated API request |
||
130 | * |
||
131 | * This is changed from the parent to include $bodyParams in $authParameters. |
||
132 | * |
||
133 | * @param string $method |
||
134 | * @param UriInterface $uri The uri the request is headed |
||
135 | * @param TokenInterface $token |
||
136 | * @param array $bodyParams Request body if applicable (key/value pairs) |
||
137 | * |
||
138 | * @return string |
||
139 | */ |
||
140 | protected function buildAuthorizationHeaderForAPIRequest( |
||
168 | } |
||
169 |