1 | <?php |
||
2 | |||
3 | require __DIR__ . '/../vendor/autoload.php'; |
||
4 | |||
5 | use Stevenmaguire\OAuth2\Client\Provider\Basecamp; |
||
6 | |||
7 | // Replace these with your token settings |
||
8 | // Create a project at https://launchpad.37signals.com/integrations |
||
9 | $clientId = 'your-client-id'; |
||
10 | $clientSecret = 'your-client-secret'; |
||
11 | |||
12 | // Change this if you are not using the built-in PHP server |
||
13 | $redirectUri = 'http://localhost:8080/'; |
||
14 | |||
15 | // Start the session |
||
16 | session_start(); |
||
17 | |||
18 | // Initialize the provider |
||
19 | $provider = new Basecamp(compact('clientId', 'clientSecret', 'redirectUri')); |
||
20 | |||
21 | // No HTML for demo, prevents any attempt at XSS |
||
22 | header('Content-Type', 'text/plain'); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
23 | |||
24 | return $provider; |
||
25 |