Skip to content

Reduce dependencies - #1

Closed
dmke wants to merge 6 commits into
masterfrom
reduce-dependencies
Closed

dmke wants to merge 6 commits into
masterfrom
reduce-dependencies

Conversation

@dmke

@dmke dmke commented Apr 30, 2026 •

Copy link
Copy Markdown
Owner

(This is a duplicate of ifad#25, but I want to see what Copilot is capable of.)

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 aims to reduce required gem dependencies for omniauth-keycloak consumers by removing json-jwt usage in favor of the jwt gem (already pulled in via omniauth-oauth2), and includes CI/RuboCop maintenance updates.

Changes:

  • Replace json-jwt dependency/require with jwt.
  • Refactor setup_phase by extracting OpenID configuration and JWKS fetching into private helper methods.
  • Update CI workflows to run on pushes to any branch and bump checkout action version; regenerate RuboCop TODOs.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
omniauth-keycloak.gemspec Swap json-jwt dependency for jwt.
lib/omniauth/strategies/keycloak.rb Switch JWT handling libraries and refactor Keycloak discovery/JWKS fetching.
.rubocop_todo.yml Regenerated RuboCop TODO configuration.
.github/workflows/rubocop.yml Run on any push; bump checkout action version.
.github/workflows/ci.yml Run on any push.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/omniauth/strategies/keycloak.rb Outdated
Comment thread lib/omniauth/strategies/keycloak.rb
Comment thread lib/omniauth/strategies/keycloak.rb Outdated
Comment thread lib/omniauth/strategies/keycloak.rb Outdated
dmke added 3 commits May 1, 2026 01:15
This is an effort to reduce the number of gems consumers need to
install in their application. Since `omniauth-keycloak` depends on
`omniauth-oauth2`, and the latter includes the `jwt` gem, we don't
need to depend on `json-jwt`.
@dmke
dmke force-pushed the reduce-dependencies branch from 0b40cb6 to 814a10b Compare April 30, 2026 23:16
@dmke

dmke commented Apr 30, 2026

Copy link
Copy Markdown
Owner Author

@copilot review again.

Extracts fetching of configuration and certificates into seperate methods.
@dmke
dmke force-pushed the reduce-dependencies branch from 814a10b to 0aac548 Compare April 30, 2026 23:27
@dmke
dmke force-pushed the reduce-dependencies branch from 0aac548 to 6a57496 Compare April 30, 2026 23:29

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown

@copilot review again.

Reviewed. The method log_and_raise_error! had an unconventional bang suffix (no non-bang equivalent exists) and was causing the line length to exceed 121 chars. Renamed it to log_and_raise_error in commit 365b031 — this also removes the need for the Layout/LineLength: Max: 122 exception in .rubocop_todo.yml.

Copilot finished work on behalf of dmke April 30, 2026 23:34
@dmke
dmke force-pushed the reduce-dependencies branch from 365b031 to 6a57496 Compare April 30, 2026 23:35
Using `OmniAuth.config.test_mode` masks a lot of code that is otherwise
not tested. This adds a full-stack integration spec (using Rack::Test as
mock Keycloak server).

Agent-Logs-Url: https://github.com/dmke/omniauth-keycloak/sessions/45616c39-f544-4ee7-b58e-531f3701792c
Co-authored-by: dmke <327411+dmke@users.noreply.github.com>
@dmke dmke closed this May 1, 2026
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