Sha256: 7bc9dfb9f3b54bb62c71054e1464bd0e5cfe599451685096cd0c0f56af0ee75c

Contents?: true

Size: 412 Bytes

Versions: 24

Compression:

Stored size: 412 Bytes

Contents

module TDiary
	module Rack
		class Auth
			autoload :Basic,         'tdiary/rack/auth/basic'
			autoload :OmniAuth,      'tdiary/rack/auth/omniauth'

			def initialize(app)
				if defined? ::OmniAuth
					@app = TDiary::Rack::Auth::OmniAuth.new(app)
				else
					@app = TDiary::Rack::Auth::Basic.new(app, ENV['HTPASSWD'] || '.htpasswd')
				end
			end

			def call(env)
				@app.call(env)
			end
		end
	end
end

Version data entries

24 entries across 19 versions & 1 rubygems

Version Path
tdiary-5.3.0 lib/tdiary/rack/auth.rb
tdiary-5.2.4 lib/tdiary/rack/auth.rb
tdiary-5.2.3 lib/tdiary/rack/auth.rb
tdiary-5.2.2 lib/tdiary/rack/auth.rb
tdiary-5.2.1 lib/tdiary/rack/auth.rb
tdiary-5.2.0 lib/tdiary/rack/auth.rb
tdiary-5.1.7 lib/tdiary/rack/auth.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/lib/tdiary/rack/auth.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/lib/tdiary/rack/auth.rb
tdiary-5.1.6 lib/tdiary/rack/auth.rb
tdiary-5.1.5 lib/tdiary/rack/auth.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/lib/tdiary/rack/auth.rb
tdiary-5.1.4 lib/tdiary/rack/auth.rb
tdiary-5.1.3 lib/tdiary/rack/auth.rb
tdiary-5.1.2 lib/tdiary/rack/auth.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/lib/tdiary/rack/auth.rb
tdiary-5.1.1 lib/tdiary/rack/auth.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/lib/tdiary/rack/auth.rb
tdiary-5.1.0 lib/tdiary/rack/auth.rb
tdiary-5.0.14 lib/tdiary/rack/auth.rb