twilio / twilio-java

A Java library for communicating with the Twilio REST API and generating TwiML.
MIT License
491 stars 430 forks source link

feat: Support for token based authentication and addition of helpers for organisation apis #797

Closed AsabuHere closed 5 months ago

AsabuHere commented 5 months ago

Fixes

A short description of what this PR does.

The Page class in bearertoken section is responsible for handling the pagination. This fetch "meta" information from the root level and use this information for pagination. For /scim/Users endpoint, this information is not present at root level which is causing the sdk to break. To avoid this added a null check after fetching "meta" from root level and proceed only if its not null

Checklist

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

sbansla commented 5 months ago

@AsabuHere Going forward all APIs will be moving towards Bearer Token Authentication, So we don't want to change pagination just for one API. [Important] Make sure whatever pagination you are using for Orgs API is compatible with other APIs as well. Add summary to PR.

Rest Proxy supports 2 types of pagination. I will message you what are those pagination and we don't want to support any 3rd pagination technique.

AsabuHere commented 5 months ago

@AsabuHere Going forward all APIs will be moving towards Bearer Token Authentication, So we don't want to change pagination just for one API. [Important] Make sure whatever pagination you are using for Orgs API is compatible with other APIs as well. Add summary to PR.

Rest Proxy supports 2 types of pagination. I will message you what are those pagination and we don't want to support any 3rd pagination technique.

This is not addition of a new pagination mechanism. This is just handling of a null pointer issue. When meta is not present, the sdk is breaking, to prevent that added a check to verify if meta is null or not before actually using it

@sbansla @kridai Can you please approve?

kridai commented 5 months ago

@AsabuHere We also need an example of how the auth token based authentication apis will be called via the client /customer. Could you please add an example here

AsabuHere commented 5 months ago

@AsabuHere We also need an example of how the auth token based authentication apis will be called via the client /customer. Could you please add an example here

Added

AsabuHere commented 5 months ago

@AsabuHere We also need an example of how the auth token based authentication apis will be called via the client /customer. Could you please add an example here

added