Sha256: 8933531c0f3bed25ed49edddbf8d3e5c3a48cb23e7b22ca20e4ee19c34a50f9b

Contents?: true

Size: 210 Bytes

Versions: 4

Compression:

Stored size: 210 Bytes

Contents

module RapidRack
  module RedisRegistry
    def register_jti(jti)
      key = "rapid_rack:jti:#{jti}"
      redis.setnx(key, 1) && redis.expire(key, 60)
    end

    def redis
      Redis.new
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rapid-rack-0.3.0 lib/rapid_rack/redis_registry.rb
rapid-rack-0.2.0 lib/rapid_rack/redis_registry.rb
rapid-rack-0.1.0 lib/rapid_rack/redis_registry.rb
rapid-rack-0.0.1 lib/rapid_rack/redis_registry.rb