rails-oidc_provider 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: def5a98707e364b76862f489e089a761de257f56fc5e9cef5cccd72e2188d8e6
4
- data.tar.gz: 50dc19a68bc750f29d9c919d2c58a5642cb006492c008115f9e685da3905d203
3
+ metadata.gz: 3bc673d5865cfeccf58caf9912c638daaaf68caf033df9c6d4ea8f246edb964c
4
+ data.tar.gz: 7eb6d8f67a6071f07c6cd4200edf40e66b339b9cb0c225b852d9533c4b9cea2e
5
5
  SHA512:
6
- metadata.gz: b82c74fe61aae38c6eee78f7becebb9cdf6882521b3593cfb526be17e00a25e523580959517598fb4946c2be72013359b70a883db9b3bb2a8f98459b7680ca67
7
- data.tar.gz: 980447a4deb97ca2fbba63f798f293190486fd654b0bcf6e94de496a210df9d398a4f2e8021106304adbc8461eb843238938eb53ca90dee11c236eaefa26d446
6
+ metadata.gz: a99e3f19673ada41e12c8abadb8c26475c967968267babe94c8dbb173012f5ca65c29b27bad799d6bcc858dd898cdb842f6c3af4eb35bb6e90549ca6c12fa971
7
+ data.tar.gz: 9c3629d6ae301b84de6b2b3c9b96ca817ae7db6cd588cbd8c109d19efbf590e473a3481d0947f3089d904dfdbceefdfcaf54936a7f6dbe20926c4b1f65b958a1
data/CHANGELOG.md CHANGED
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.0.1] - 2026-03-26
11
+
12
+ ### Fixed
13
+
14
+ - Ship Bundler-default require entrypoints (`lib/rails-oidc_provider.rb` and
15
+ `lib/rails/oidc_provider.rb`). Host apps that only list
16
+ `gem 'rails-oidc_provider'` and call `Bundler.require` no longer boot with
17
+ `uninitialized constant OIDCProvider` in `config/initializers/oidc_provider.rb`.
18
+ - `Client#redirect_uri=` normalizes input: one URI stays a String (rack-oauth2
19
+ may omit `redirect_uri` on the request), multiple stay an Array; token
20
+ matching uses `Array(redirect_uri).include?`.
21
+
22
+ ### Added
23
+
24
+ - Gem structure / packaging specs covering Bundler require paths, built `.gem`
25
+ contents, and host-style loading of `OIDCProvider`.
26
+ - Configuration unit specs for `OIDCProvider.configure`, clients, scopes,
27
+ lookups, `ClientStore`, and the `RailsOidcProvider` alias.
28
+
10
29
  ## [1.0.0] - 2026-03-26
11
30
 
12
31
  First release of **`rails-oidc_provider`**, a maintained OpenID Connect provider
@@ -50,5 +69,6 @@ The runtime Ruby API remains `OIDCProvider` for drop-in compatibility. A
50
69
  engine smoke tests removed).
51
70
  - Runtime dependency floor raised to Rails `>= 7.0` and Ruby `>= 3.1`.
52
71
 
53
- [Unreleased]: https://github.com/pharmony/rails-oidc_provider/compare/v1.0.0...HEAD
72
+ [Unreleased]: https://github.com/pharmony/rails-oidc_provider/compare/v1.0.1...HEAD
73
+ [1.0.1]: https://github.com/pharmony/rails-oidc_provider/compare/v1.0.0...v1.0.1
54
74
  [1.0.0]: https://github.com/pharmony/rails-oidc_provider/releases/tag/v1.0.0
data/README.md CHANGED
@@ -29,6 +29,10 @@ Add this line to your application's Gemfile:
29
29
  gem 'rails-oidc_provider'
30
30
  ```
31
31
 
32
+ `Bundler.require` loads the engine automatically (hyphenated gem name maps to
33
+ `rails-oidc_provider` / `rails/oidc_provider` entrypoints). You can also require
34
+ explicitly with `require 'rails_oidc_provider'` or `require 'oidc_provider'`.
35
+
32
36
  Then:
33
37
 
34
38
  ```bash
@@ -152,11 +156,22 @@ long-lived API keys.
152
156
  gem build rails-oidc_provider.gemspec
153
157
  gem push rails-oidc_provider-1.0.0.gem # prompts for credentials / OTP
154
158
  ```
155
- 3. On the gem’s RubyGems page → **Trusted Publishing** → add a GitHub provider:
156
- - **Organization or user:** `pharmony`
157
- - **Repository:** `rails-oidc_provider`
158
- - **Workflow filename:** `release.yml`
159
- - **Environment:** leave blank (unless you set `environment:` in the workflow)
159
+ 3. On the gem’s RubyGems page → **Trusted publishers** → add a GitHub provider.
160
+ Fields must match the OIDC claims from `.github/workflows/release.yml` exactly:
161
+ - **Organization or user:** `Pharmony` (GitHub owner; casing as on github.com)
162
+ - **Repository:** `rails-oidc_provider` (repo name only — not `Pharmony/…`)
163
+ - **Workflow filename:** `release.yml` (basename only — not a path)
164
+ - **Environment:** `release` (must match `environment: release` in the workflow)
165
+
166
+ Also create a GitHub Environment named `release`
167
+ (Settings → Environments) if it does not exist. No protection rules are
168
+ required for publishing to work; rules are optional extra gates.
169
+
170
+ Common misconfig that yields
171
+ `No trusted publisher configured for this workflow`:
172
+ - Environment set to `release` on RubyGems but missing on the workflow (or the reverse)
173
+ - Wrong repo name / owner casing / `owner/repo` stuffed into Repository
174
+ - Workflow filename with a path (`/.github/workflows/release.yml`)
160
175
 
161
176
  No `RUBYGEMS_API_KEY` secret is required when Trusted Publishing is configured.
162
177
 
@@ -177,10 +192,14 @@ No `RUBYGEMS_API_KEY` secret is required when Trusted Publishing is configured.
177
192
  git push origin master
178
193
  git push origin "v${version}"
179
194
  ```
180
- 5. Confirm the **Release** workflow is green and the version appears on
181
- https://rubygems.org/gems/rails-oidc_provider
182
-
183
- The workflow fails if the tag (e.g. `v1.0.1`) does not match `VERSION` (`1.0.1`).
195
+ 5. Confirm the **Release** workflow is green. It will:
196
+ - publish the gem to https://rubygems.org/gems/rails-oidc_provider
197
+ - create a **GitHub Release** for the tag whose notes are the matching
198
+ section extracted from `CHANGELOG.md` (and attach the built `.gem`)
199
+
200
+ The workflow fails if the tag (e.g. `v1.0.1`) does not match `VERSION` (`1.0.1`),
201
+ or if `CHANGELOG.md` has no `## [1.0.1]` heading (notes fall back to a short
202
+ default message).
184
203
 
185
204
  ### Local build only (no push)
186
205
 
@@ -2,14 +2,23 @@
2
2
 
3
3
  module OIDCProvider
4
4
  class Client
5
- attr_accessor :identifier, :secret, :redirect_uri, :name
5
+ attr_accessor :identifier, :secret, :name
6
+ attr_reader :redirect_uri
6
7
 
7
8
  def initialize(options = {})
8
9
  @identifier = options[:identifier]
9
10
  @secret = options[:secret]
10
- @redirect_uri = Array(options[:redirect_uri])
11
+ self.redirect_uri = options[:redirect_uri]
11
12
  @name = options[:name]
12
13
  end
14
+
15
+ # Hosts may pass a String (generator/README) or an Array of URIs.
16
+ # rack-oauth2 treats a single registered URI as a String (request may omit
17
+ # redirect_uri) and multiple URIs as an Array (request must send one).
18
+ def redirect_uri=(value)
19
+ values = Array(value).flatten.compact
20
+ @redirect_uri = values.size <= 1 ? values.first : values
21
+ end
13
22
  end
14
23
  end
15
24
 
@@ -32,7 +32,7 @@ module OIDCProvider
32
32
 
33
33
  return nil unless client
34
34
 
35
- client.redirect_uri.include?(req.redirect_uri) ? client : nil
35
+ Array(client.redirect_uri).include?(req.redirect_uri) ? client : nil
36
36
  end
37
37
  end
38
38
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Bundler.require falls back to gem.name.tr('-', '/') when the hyphenated
4
+ # require fails. Keep this path so either resolution order loads the engine.
5
+ require_relative '../rails_oidc_provider'
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Bundler.require tries Kernel.require(gem.name) first for hyphenated gems.
4
+ # See bundler/runtime.rb — without this file the engine never loads in hosts.
5
+ require_relative 'rails_oidc_provider'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsOidcProvider
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-oidc_provider
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pharmony SA
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-11-19 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: openid_connect
@@ -97,18 +98,21 @@ files:
97
98
  - lib/oidc_provider/scope_config.rb
98
99
  - lib/oidc_provider/token_endpoint.rb
99
100
  - lib/oidc_provider/version.rb
101
+ - lib/rails-oidc_provider.rb
102
+ - lib/rails/oidc_provider.rb
100
103
  - lib/rails_oidc_provider.rb
101
104
  - lib/rails_oidc_provider/version.rb
102
105
  - lib/tasks/oidc_provider.rake
103
- homepage: https://github.com/zedtux/rails-oidc_provider
106
+ homepage: https://github.com/Pharmony/rails-oidc_provider
104
107
  licenses:
105
108
  - MIT
106
109
  metadata:
107
110
  allowed_push_host: https://rubygems.org
108
- homepage_uri: https://github.com/zedtux/rails-oidc_provider
109
- source_code_uri: https://github.com/zedtux/rails-oidc_provider
110
- changelog_uri: https://github.com/zedtux/rails-oidc_provider/blob/master/CHANGELOG.md
111
+ homepage_uri: https://github.com/Pharmony/rails-oidc_provider
112
+ source_code_uri: https://github.com/Pharmony/rails-oidc_provider
113
+ changelog_uri: https://github.com/Pharmony/rails-oidc_provider/blob/master/CHANGELOG.md
111
114
  rubygems_mfa_required: 'true'
115
+ post_install_message:
112
116
  rdoc_options: []
113
117
  require_paths:
114
118
  - lib
@@ -123,7 +127,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
127
  - !ruby/object:Gem::Version
124
128
  version: '0'
125
129
  requirements: []
126
- rubygems_version: 3.6.7
130
+ rubygems_version: 3.5.22
131
+ signing_key:
127
132
  specification_version: 4
128
133
  summary: Rails engine that turns an application into an OpenID Connect provider.
129
134
  test_files: []