Skip to content

Swap out JWT for Oauth - #12

Merged
DBugger32 merged 7 commits into
mainfrom
oauth
Aug 20, 2026
Merged

Swap out JWT for Oauth#12
DBugger32 merged 7 commits into
mainfrom
oauth

Conversation

@DBugger32

Copy link
Copy Markdown
Contributor

No description provided.

@DBugger32
DBugger32 requested a lite review from Copilot August 20, 2026 15:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 JwtProvider with OauthProvider and updates operations to request OAuth access tokens for API calls.
  • Simplifies Credentials / CredentialsBuilder to only handle client_id and client_secret, updating fixtures and tests to match.
  • Updates dependency/CI configuration (notably removing the jwt gem), 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.

Comment thread pdfservices-ruby-sdk.gemspec
@DBugger32
DBugger32 merged commit adc4f38 into main Aug 20, 2026
2 checks passed
@DBugger32
DBugger32 deleted the oauth branch August 20, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants