verikloak-audience 0.2.1 → 0.2.3
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 +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/verikloak/audience/middleware.rb +13 -1
- data/lib/verikloak/audience/railtie.rb +5 -1
- data/lib/verikloak/audience/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 713d20df5953ade3498d0e2fbd5ea3adbd86475911e3bf28b9d3ba670a5fdac7
         | 
| 4 | 
            +
              data.tar.gz: a2f6975e273151879cd3a9bde96b0619b6db1214f5a1f9d007992dbb0bea6467
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: b8288ce11783eb853baa74d1c1fa3622b547b2332e140c6e395cd28301a1995a39d329c54df46121bfec54f222784e923ae0d6de7ff4a226e55c88f195980804
         | 
| 7 | 
            +
              data.tar.gz: 9856d8684a3fbdcbde033e48926878a0cb54578c24f95f57ff34d4e62385249cbd8707721a59b3495b7f980413189fe32a9cc11d4af4319015aea34c0467852d
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
| 7 7 |  | 
| 8 8 | 
             
            ---
         | 
| 9 9 |  | 
| 10 | 
            +
            ## [0.2.3] - 2025-09-22
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            ### Fixed
         | 
| 13 | 
            +
            - Detect the `verikloak:install` namespace after Rails strips the `g` alias so generator invocations inside wrappers (e.g. `docker compose run`) no longer fail validation.
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            ## [0.2.2] - 2025-09-22
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            ### Fixed
         | 
| 18 | 
            +
            - Skip middleware configuration validation when Rails generator commands execute so `rails g verikloak:install` can boot without preconfigured audiences.
         | 
| 19 | 
            +
             | 
| 10 20 | 
             
            ## [0.2.1] - 2025-09-22
         | 
| 11 21 |  | 
| 12 22 | 
             
            ### Fixed
         | 
| @@ -24,7 +24,7 @@ module Verikloak | |
| 24 24 | 
             
                    @app = app
         | 
| 25 25 | 
             
                    @config = Verikloak::Audience.config.dup
         | 
| 26 26 | 
             
                    apply_overrides!(opts)
         | 
| 27 | 
            -
                    @config.validate!
         | 
| 27 | 
            +
                    @config.validate! unless skip_validation?
         | 
| 28 28 | 
             
                  end
         | 
| 29 29 |  | 
| 30 30 | 
             
                  # Evaluate the request against the audience profile.
         | 
| @@ -70,6 +70,18 @@ module Verikloak | |
| 70 70 | 
             
                    end
         | 
| 71 71 | 
             
                  end
         | 
| 72 72 |  | 
| 73 | 
            +
                  # Determine whether configuration validation should run. This allows
         | 
| 74 | 
            +
                  # Rails generators to boot without a fully-populated configuration since
         | 
| 75 | 
            +
                  # the install task is responsible for creating it.
         | 
| 76 | 
            +
                  #
         | 
| 77 | 
            +
                  # @return [Boolean]
         | 
| 78 | 
            +
                  def skip_validation?
         | 
| 79 | 
            +
                    return false unless defined?(::Verikloak::Audience::Railtie)
         | 
| 80 | 
            +
                    return false unless ::Verikloak::Audience::Railtie.respond_to?(:skip_configuration_validation?)
         | 
| 81 | 
            +
             | 
| 82 | 
            +
                    ::Verikloak::Audience::Railtie.skip_configuration_validation?
         | 
| 83 | 
            +
                  end
         | 
| 84 | 
            +
             | 
| 73 85 | 
             
                  # Emit a warning for failed audience checks using request-scoped loggers
         | 
| 74 86 | 
             
                  # when available.
         | 
| 75 87 | 
             
                  #
         | 
| @@ -53,7 +53,11 @@ module Verikloak | |
| 53 53 | 
             
                    app.middleware.insert_after ::Verikloak::Middleware, ::Verikloak::Audience::Middleware
         | 
| 54 54 | 
             
                  end
         | 
| 55 55 |  | 
| 56 | 
            -
                   | 
| 56 | 
            +
                  # Rails short commands (`g`, `d`) are stripped from ARGV fairly early in
         | 
| 57 | 
            +
                  # the boot process. When that happens the first argument becomes the
         | 
| 58 | 
            +
                  # generator namespace (e.g. `verikloak:install`). Include it here so the
         | 
| 59 | 
            +
                  # install generator can run before `required_aud` is configured.
         | 
| 60 | 
            +
                  COMMANDS_SKIPPING_VALIDATION = %w[generate g destroy d verikloak:install].freeze
         | 
| 57 61 |  | 
| 58 62 | 
             
                  # Detect whether Rails is currently executing a generator-style command.
         | 
| 59 63 | 
             
                  # Generators boot the application before configuration exists, so we
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: verikloak-audience
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.2. | 
| 4 | 
            +
              version: 0.2.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - taiyaky
         | 
| @@ -74,7 +74,7 @@ metadata: | |
| 74 74 | 
             
              source_code_uri: https://github.com/taiyaky/verikloak-audience
         | 
| 75 75 | 
             
              changelog_uri: https://github.com/taiyaky/verikloak-audience/blob/main/CHANGELOG.md
         | 
| 76 76 | 
             
              bug_tracker_uri: https://github.com/taiyaky/verikloak-audience/issues
         | 
| 77 | 
            -
              documentation_uri: https://rubydoc.info/gems/verikloak-audience/0.2. | 
| 77 | 
            +
              documentation_uri: https://rubydoc.info/gems/verikloak-audience/0.2.3
         | 
| 78 78 | 
             
              rubygems_mfa_required: 'true'
         | 
| 79 79 | 
             
            rdoc_options: []
         | 
| 80 80 | 
             
            require_paths:
         |