Sha256: 0b97e152ef20e0b67a80b73325e42a6181af5a4db958e90a6226c1a0cb8697e7
Contents?: true
Size: 814 Bytes
Versions: 39
Compression:
Stored size: 814 Bytes
Contents
module Rack module OAuth2 module Server module Abstract class Handler attr_accessor :authenticator, :request, :response def initialize(&authenticator) @authenticator = authenticator end def call(env) # NOTE: # Rack middleware is initialized only on the first request of the process. # So any instance variables are acts like class variables, and modifying them in call() isn't thread-safe. # ref.) http://stackoverflow.com/questions/23028226/rack-middleware-and-thread-safety dup._call(env) end def _call(env) @authenticator.call(@request, @response) if @authenticator @response end end end end end end
Version data entries
39 entries across 39 versions & 1 rubygems