You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Refactored most `Client` methods into `AbstractClient` for better extensibility.
9
+
- BC break: The redirect URL does now need to be passed as second argument of the `Client::authenticate($scopes, $redirectUrl)` method, no longer as constructor argument.
$client = new Client($clientId, $clientSecret, $redirectUrl);
49
-
$client->authenticate($scopes);
48
+
$client = new Client($clientId, $clientSecret);
49
+
$client->authenticate($scopes, $redirectUrl);
50
50
$client->persistTokens($tokensFile);
51
51
```
52
52
@@ -76,6 +76,21 @@ $bexioContact = new Contact($client);
76
76
$contacts = $bexioContact->getContacts();
77
77
```
78
78
79
+
Usage:
80
+
81
+
1. Ensure you have allowed your local direct URL in [Bexio Developer Portal](https://developer.bexio.com/), e.g. `http://localhost:8000/auth.php`
82
+
2. Fill `$clientId` and `$clientSecret` in both `samples/auth.php` and `samples/sample.php` with your Bexio API credentials.
83
+
3. Fire up the local dev server (see below).
84
+
4. Access http://localhost:8000/auth.php in your browser.
85
+
5. Authenticate with your Bexio login to provide access to the app via access token.
86
+
6. Bexio will redirect you back to http://localhost:8000/auth.php which will present: **Sucessfully authenticated. [Proceed to sample.php](http://localhost:8000/auth.php)**
87
+
7. Once you access http://localhost:8000/sample.php, you should be already authenticated (using the current token stored in `client_tokens.json`) and your contacts are listed.
88
+
89
+
```bash
90
+
$ cd samples/
91
+
$ php -S localhost:8000
92
+
```
93
+
79
94
## Authors
80
95
81
96
Author of this awesome package is [Philip Iezzi (Onlime GmbH)](https://www.onlime.ch/).
0 commit comments