File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Webapi/Model/Authorization Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -116,22 +116,22 @@ public function getConsumerPostTimeout()
116
116
/**
117
117
* Get customer token lifetime from config.
118
118
*
119
- * @return int hours
119
+ * @return float hours
120
120
*/
121
121
public function getCustomerTokenLifetime ()
122
122
{
123
- $ hours = ( int ) $ this ->_scopeConfig ->getValue ('oauth/access_token_lifetime/customer ' );
124
- return $ hours > 0 ? $ hours : 0 ;
123
+ $ hours = $ this ->_scopeConfig ->getValue ('oauth/access_token_lifetime/customer ' );
124
+ return is_numeric ( $ hours ) && $ hours > 0 ? $ hours : 0 ;
125
125
}
126
126
127
127
/**
128
128
* Get customer token lifetime from config.
129
129
*
130
- * @return int hours
130
+ * @return float hours
131
131
*/
132
132
public function getAdminTokenLifetime ()
133
133
{
134
- $ hours = ( int ) $ this ->_scopeConfig ->getValue ('oauth/access_token_lifetime/admin ' );
135
- return $ hours > 0 ? $ hours : 0 ;
134
+ $ hours = $ this ->_scopeConfig ->getValue ('oauth/access_token_lifetime/admin ' );
135
+ return is_numeric ( $ hours ) && $ hours > 0 ? $ hours : 0 ;
136
136
}
137
137
}
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ public function __construct(
99
99
}
100
100
101
101
/**
102
- * { @inheritdoc}
102
+ * @inheritdoc
103
103
*/
104
104
public function getUserId ()
105
105
{
@@ -108,7 +108,7 @@ public function getUserId()
108
108
}
109
109
110
110
/**
111
- * { @inheritdoc}
111
+ * @inheritdoc
112
112
*/
113
113
public function getUserType ()
114
114
{
@@ -187,6 +187,8 @@ protected function processRequest()
187
187
}
188
188
189
189
/**
190
+ * Set user data based on user type received from token data.
191
+ *
190
192
* @param Token $token
191
193
* @return void
192
194
*/
You can’t perform that action at this time.
0 commit comments