Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the SDK’s authentication mechanism from JWT exchange to OAuth client-credentials, updating both the runtime token acquisition and the test/fixture setup accordingly.
Changes:
- Replaces
JwtProviderwithOauthProviderand updates operations to request OAuth access tokens for API calls. - Simplifies
Credentials/CredentialsBuilderto only handleclient_idandclient_secret, updating fixtures and tests to match. - Updates dependency/CI configuration (notably removing the
jwtgem), with a noted Ruby version support mismatch needing alignment.
Reviewed changes
Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/pdf_services_sdk/test_ocr.rb | Updates token stub from JWT exchange to OAuth token endpoint. |
| test/pdf_services_sdk/test_oauth_provider.rb | Adds unit tests covering OAuth token retrieval and error handling. |
| test/pdf_services_sdk/test_jwt_provider.rb | Removes JWT provider tests (JWT auth no longer used). |
| test/pdf_services_sdk/test_html_to_pdf.rb | Updates token stub from JWT exchange to OAuth token endpoint. |
| test/pdf_services_sdk/test_document_merge.rb | Updates token stub from JWT exchange to OAuth token endpoint. |
| test/pdf_services_sdk/test_credentials.rb | Updates credentials expectations after removing JWT-era fields. |
| test/pdf_services_sdk/test_credentials_builder.rb | Updates builder tests after removing JWT-era fields and nested JSON parsing. |
| test/fixtures/valid_oauth_response.json | Adds fixture for a successful OAuth token response. |
| test/fixtures/invalid_oauth_response.json | Adds fixture for an OAuth token error response. |
| test/fixtures/files/pdfservices-api-credentials.json | Simplifies credentials JSON structure to client_id / client_secret. |
| pdfservices-ruby-sdk.gemspec | Removes jwt dependency; updates required Ruby version (needs alignment with CI matrix). |
| lib/pdfservices/ocr/operation.rb | Switches Authorization header token source to OauthProvider. |
| lib/pdfservices/oauth_provider.rb | Adds OAuth client-credentials token provider implementation. |
| lib/pdfservices/jwt_provider.rb | Removes JWT provider implementation (no longer used). |
| lib/pdfservices/html_to_pdf/operation.rb | Switches Authorization header token source to OauthProvider. |
| lib/pdfservices/document_merge/operation.rb | Switches Authorization header token source to OauthProvider. |
| lib/pdfservices/credentials.rb | Removes JWT-era credential fields; keeps only client id/secret. |
| lib/pdfservices/credentials_builder.rb | Updates builder to parse simplified credentials JSON and build reduced Credentials. |
| lib/pdfservices.rb | Removes jwt require and swaps autoload from JwtProvider to OauthProvider. |
| Gemfile.lock | Removes jwt and updates lockfile dependency set. |
| .github/workflows/main.yml | Updates CI Ruby matrix (adds 3.4/3.3; still includes 3.2). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jbosse
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.