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
Copy file name to clipboardExpand all lines: README.md
+41-8Lines changed: 41 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,24 +6,52 @@ PLHW API Client provides means to authenticate clients against with OAuth2 serve
6
6
## Installation
7
7
8
8
```bash
9
-
composer require plhw/hf-api-client:^0.1
9
+
composer require plhw/hf-api-client
10
10
```
11
11
12
-
## Usage
13
12
13
+
14
+
## Example API calls
15
+
16
+
Once you have succesfully installed the application, some example scripts are located at. To use them first copy an configuration file to your app root.
The above is all that is nessesary to configure, though I recommend you tweak the caching meganism. Currently we use the [zendframework/zend-cache](https://docs.zendframework.com/zend-cache/) component. This might change when v3 is released to use the psr-7 caching FIG standard.
49
+
50
+
When you have `ApiClient` instance you can use it by calling methods as defined in `/vendor/plhw/hf-api-client/data/v1` on it. Additionally [API documentation](https://api.plhw.nl/docs) can be found here.
26
51
52
+
for example, search the published practices around a coordinate.
see api [documentation](https://api.plhw.nl/docs) for end points.
68
+
## Under the hood
69
+
70
+
When you call any method on the APIClient instance an access token is requested from our OAuth2 server. This access token is then cached for aditional uses up to the moment it expires or is deleted. It will then get a new access token.
71
+
72
+
Any calls to our API are now `signed` with that access token and is used by our permission system to determain if you have access or not.
73
+
74
+
Our API will accept and return json payload with are automaticly (de)encoded.
42
75
43
-
## ClientCredentialsGrant
76
+
### OAuth2 ClientCredentialsGrant
44
77
45
78
For machine to machine communication OAuth2 ClientCredentialGrant is appropiate.
46
79
You must obtain the following information from us.
0 commit comments