9
9
use Magento \Framework \Encryption \Helper \Security ;
10
10
use Magento \Framework \Phrase ;
11
11
12
+ /**
13
+ * Authorization service.
14
+ */
12
15
class Oauth implements OauthInterface
13
16
{
14
17
/**
@@ -61,7 +64,7 @@ public static function getSupportedSignatureMethods()
61
64
}
62
65
63
66
/**
64
- * { @inheritdoc}
67
+ * @inheritdoc
65
68
*/
66
69
public function getRequestToken ($ params , $ requestUrl , $ httpMethod = 'POST ' )
67
70
{
@@ -74,7 +77,7 @@ public function getRequestToken($params, $requestUrl, $httpMethod = 'POST')
74
77
}
75
78
76
79
/**
77
- * { @inheritdoc}
80
+ * @inheritdoc
78
81
*/
79
82
public function getAccessToken ($ params , $ requestUrl , $ httpMethod = 'POST ' )
80
83
{
@@ -102,7 +105,7 @@ public function getAccessToken($params, $requestUrl, $httpMethod = 'POST')
102
105
}
103
106
104
107
/**
105
- * { @inheritdoc}
108
+ * @inheritdoc
106
109
*/
107
110
public function validateAccessTokenRequest ($ params , $ requestUrl , $ httpMethod = 'POST ' )
108
111
{
@@ -125,15 +128,15 @@ public function validateAccessTokenRequest($params, $requestUrl, $httpMethod = '
125
128
}
126
129
127
130
/**
128
- * { @inheritdoc}
131
+ * @inheritdoc
129
132
*/
130
133
public function validateAccessToken ($ accessToken )
131
134
{
132
135
return $ this ->_tokenProvider ->validateAccessToken ($ accessToken );
133
136
}
134
137
135
138
/**
136
- * { @inheritdoc}
139
+ * @inheritdoc
137
140
*/
138
141
public function buildAuthorizationHeader (
139
142
$ params ,
@@ -199,7 +202,7 @@ protected function _validateSignature($params, $consumerSecret, $httpMethod, $re
199
202
);
200
203
201
204
if (!Security::compareStrings ($ calculatedSign , $ params ['oauth_signature ' ])) {
202
- throw new Exception (new Phrase ('The signatire is invalid. Verify and try again. ' ));
205
+ throw new Exception (new Phrase ('The signature is invalid. Verify and try again. ' ));
203
206
}
204
207
}
205
208
0 commit comments