Sha256: a6e5de1ddce29fac84ba5737b3a9888f6e71188d9cf9a2c1a390227cdb5a3910
Contents?: true
Size: 806 Bytes
Versions: 10
Compression:
Stored size: 806 Bytes
Contents
require 'roo_on_rails/rack/populate_env_from_jwt' module RooOnRails module Railties class RooIdentity < Rails::Railtie initializer 'roo_on_rails.roo_identity.middleware' do |app| Rails.logger.with initializer: 'roo_on_rails.roo_identity' do |log| if RooOnRails::Rack::PopulateEnvFromJWT.configured? log.debug 'loading' _add_middleware(app, log) else log.warn 'not configured, roo.identity will be unavailable' end end end private def _add_middleware(app, log) app.config.middleware.use RooOnRails::Rack::PopulateEnvFromJWT, logger: log rescue LoadError log.error 'the json-jwt gem is not in the bundle so Roo Identity will not be available' end end end end
Version data entries
10 entries across 10 versions & 1 rubygems