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
+32-22Lines changed: 32 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,18 @@
2
2
3
3
The official Java library for integrating with the Onfido API.
4
4
5
-
Documentation can be found at <https://documentation.onfido.com>.
5
+
Documentation is available at <https://documentation.onfido.com>.
6
6
7
-
This library is only for use on the backend, as it uses Onfido API tokens which must be kept secret. If you do need to collect applicant data in the frontend of your application, we recommend that you use the Onfido SDKs: [iOS](https://github.com/onfido/onfido-ios-sdk), [Android](https://github.com/onfido/onfido-android-sdk), [Web](https://github.com/onfido/onfido-sdk-ui), and [React Native](https://github.com/onfido/react-native-sdk).
7
+
This library is for backend use only, as it requires secret Onfido API tokens and should not be used in the frontend due to security reasons.
8
8
9
-
This version uses Onfido API v3.6. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details of which client library versions use which versions of the API.
9
+
If you need to collect applicant data in the frontend of your application, we recommend that you use the Onfido SDKs:
This version uses Onfido API v3.6. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details. The guide explains which client library versions use which API versions.
The above will return an `Applicant.Request` object that can be provided to the `create()` method as the request body, so a full call to to the API will look something like:
122
+
The above will return an `ApplicantBuilder` object that can be provided to the `createApplicant()` method as the request body, a full call to the API will look something like:
115
123
116
124
```java
117
125
try {
@@ -136,7 +144,7 @@ try {
136
144
137
145
### Webhook event verification
138
146
139
-
Webhook events payload needs to be verified before it can be accessed. Library allows to easily decode the payload and verify its signature before returning it as an object for user convenience:
147
+
Webhook events payload needs to be verified before it can be accessed. Verifying webhook payloads is crucial for security reasons, as it ensures that the payloads are indeed from Onfido and have not been tampered with. The library allows you to easily decode the payload and verify its signature before returning it as an object for user convenience:
140
148
141
149
```java
142
150
try {
@@ -156,45 +164,47 @@ try {
156
164
157
165
### Don't share DefaultApi among different threads
158
166
159
-
It's recommended to create an instance of `DefaultApi` per thread in a multithreaded environment to avoid any potential issues.
167
+
It's recommended to create an instance of `DefaultApi` per thread in a multithreaded environment to avoid potential issues.
160
168
161
169
#### Do not use additional properties
162
170
163
-
Retain from using `getAdditionalProperty()` or `getAdditionalProperties()` methods to access not defined properties to avoid breaking changes when these fields will appear.
171
+
Except for retrieving Task object's outputs, avoid using `getAdditionalProperty()` or `getAdditionalProperties()` methods to access undefined properties to prevent breaking changes when these fields appear.
164
172
165
173
## Contributing
166
174
167
-
This library is automatically generated using [OpenAPI Generator](https://openapi-generator.tech) (version: 7.9.0); therefore all the contributions, except tests files, should target [Onfido OpenAPI specification repository](https://github.com/onfido/onfido-openapi-spec/tree/master) instead of this repository.
175
+
This library is automatically generated using [OpenAPI Generator](https://openapi-generator.tech) (version: 7.9.0); therefore, all contributions (except test files) should target the [Onfido OpenAPI specification repository](https://github.com/onfido/onfido-openapi-spec/tree/master) instead of this repository. Please follow the contribution guidelines provided in the OpenAPI specification repository.
168
176
169
177
For contributions to the tests instead, please follow the steps below:
if ((jsonObj.get("customer_user_id") != null && !jsonObj.get("customer_user_id").isJsonNull()) && !jsonObj.get("customer_user_id").isJsonPrimitive()) {
639
+
thrownewIllegalArgumentException(String.format("Expected the field `customer_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customer_user_id").toString()));
0 commit comments