File tree 2 files changed +19
-2
lines changed 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -164,8 +164,7 @@ public function getToken($code)
164
164
$ data = $ this ->guzzle ->get ($ uri )->json (['object ' => true ]);
165
165
166
166
if (isset ($ data ->access_token )) {
167
- // POSSIBLY WE SHOULD RETURN OBJECT, WITH USER_ID AND EXPIRES IN, NOT ONLY TOKEN
168
- return $ data ->access_token ;
167
+ return new \getjump \Vk \Response \Auth ($ data ->access_token , $ data ->expires_in , $ data ->user_id );
169
168
} elseif (isset ($ data ->error )) {
170
169
// ERROR PROCESSING
171
170
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace getjump \Vk \Response ;
4
+
5
+
6
+ class Auth {
7
+
8
+ public $ token = false ;
9
+ public $ expiresIn = false ;
10
+ public $ userId = false ;
11
+
12
+ public function __construct ($ token = false , $ expiresIn = false , $ userId = false )
13
+ {
14
+ $ this ->token = $ token ;
15
+ $ this ->expiresIn = $ expiresIn ;
16
+ $ this ->userId = $ userId ;
17
+ }
18
+ }
You can’t perform that action at this time.
0 commit comments