File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed
Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -55,18 +55,30 @@ protected function getTokenUrl()
5555 */
5656 protected function getUserByToken ($ token )
5757 {
58- $ response = $ this ->getHttpClient ()->get (
59- $ this ->getBaseUrl ().'/application/o/userinfo/ ' ,
60- [
61- RequestOptions::HEADERS => [
62- 'Authorization ' => 'Bearer ' .$ token ,
63- ],
64- ]
65- );
58+ $ response = $ this ->getHttpClient ()->get ($ this ->getBaseUrl ().'/application/o/userinfo/ ' , [
59+ RequestOptions::HEADERS => [
60+ 'Authorization ' => 'Bearer ' .$ token ,
61+ ],
62+ ]);
6663
6764 return json_decode ((string ) $ response ->getBody (), true );
6865 }
6966
67+ /**
68+ * {@inheritdoc}
69+ */
70+ protected function refreshToken ($ refreshToken )
71+ {
72+ return $ this ->getHttpClient ()->post ($ this ->getTokenUrl (), [
73+ RequestOptions::FORM_PARAMS => [
74+ 'client_id ' => $ this ->clientId ,
75+ 'client_secret ' => $ this ->clientSecret ,
76+ 'grant_type ' => 'refresh_token ' ,
77+ 'refresh_token ' => $ refreshToken ,
78+ ],
79+ ]);
80+ }
81+
7082 /**
7183 * {@inheritdoc}
7284 */
You can’t perform that action at this time.
0 commit comments