1 | <?php |
||
10 | class GenerateRefreshTokenCommand extends Command |
||
11 | { |
||
12 | /** |
||
13 | * @var string the OAuth2 scope for the AdWords API |
||
14 | * @see https://developers.google.com/adwords/api/docs/guides/authentication#scope |
||
15 | */ |
||
16 | const ADWORDS_API_SCOPE = 'https://www.googleapis.com/auth/adwords'; |
||
17 | /** |
||
18 | * @var string the Google OAuth2 authorization URI for OAuth2 requests |
||
19 | * @see https://developers.google.com/identity/protocols/OAuth2InstalledApp#formingtheurl |
||
20 | */ |
||
21 | const AUTHORIZATION_URI = 'https://accounts.google.com/o/oauth2/v2/auth'; |
||
22 | /** |
||
23 | * @var string the redirect URI for OAuth2 installed application flows |
||
24 | * @see https://developers.google.com/identity/protocols/OAuth2InstalledApp#formingtheurl |
||
25 | */ |
||
26 | const REDIRECT_URI = 'urn:ietf:wg:oauth:2.0:oob'; |
||
27 | /** |
||
28 | * Console command signature. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $signature = 'adwords:token'; |
||
33 | /** |
||
34 | * Description. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $description = 'Generate a new refresh token for Google Ads API'; |
||
39 | |||
40 | public function handle() |
||
93 | |||
94 | /** |
||
95 | * Configuration. |
||
96 | * |
||
97 | * @return bool|array |
||
98 | */ |
||
99 | private function config() |
||
109 | } |
||
110 |