Commit 9c7f7e3 1 parent d195fae commit 9c7f7e3 Copy full SHA for 9c7f7e3
File tree 2 files changed +7
-9
lines changed
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 12
12
* ----------------------------------------------------------------------------------
13
13
*
14
14
* @author lanlin
15
- * @change 2020/06/24
15
+ * @change 2021/11/23
16
16
*/
17
17
class Hosted
18
18
{
@@ -81,14 +81,12 @@ public function postOAuthToken(string $code): array
81
81
82
82
$ params = $ this ->options ->getClientApps ();
83
83
84
- $ params ['code ' ] = $ code ;
85
-
86
- $ query = ['grant_type ' => 'authorization_code ' ];
87
- $ query = \array_merge ($ query , $ params );
84
+ $ params ['code ' ] = $ code ;
85
+ $ params ['grant_type ' ] = 'authorization_code ' ;
88
86
89
87
return $ this ->options
90
88
->getSync ()
91
- ->setQuery ( $ query )
89
+ ->setFormParams ( $ params )
92
90
->post (API ::LIST ['oAuthToken ' ]);
93
91
}
94
92
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public function __construct(Options $options)
39
39
// ------------------------------------------------------------------------------
40
40
41
41
/**
42
- * echo challenge to validate webhook
42
+ * echo challenge to validate webhook (for fpm mode)
43
43
*
44
44
* TIPS: you'd better use the output method from your framework.
45
45
*/
@@ -60,7 +60,7 @@ public function echoChallenge(): void
60
60
// ------------------------------------------------------------------------------
61
61
62
62
/**
63
- * get notification & parse it
63
+ * get notification & parse it (for fpm mode)
64
64
*
65
65
* @return array
66
66
* [
@@ -90,7 +90,7 @@ public function getNotification(): array
90
90
// ------------------------------------------------------------------------------
91
91
92
92
/**
93
- * webhook X-Nylas-Signature header verification
93
+ * webhook X-Nylas-Signature header verification (for other mode)
94
94
*
95
95
* @see https://docs.nylas.com/reference#receiving-notifications
96
96
*
You can’t perform that action at this time.
0 commit comments