Sha256: c1f5719e041e0f407fec0e0158401d828e36b7ead8bb2ccafe8c4a7e7e967bdd

Contents?: true

Size: 393 Bytes

Versions: 20

Compression:

Stored size: 393 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, '.htpasswd')
				end
			end

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

Version data entries

20 entries across 14 versions & 1 rubygems

Version Path
tdiary-5.0.9 lib/tdiary/rack/auth.rb
tdiary-5.0.8 lib/tdiary/rack/auth.rb
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/lib/tdiary/rack/auth.rb
tdiary-5.0.7 lib/tdiary/rack/auth.rb
tdiary-5.0.6 lib/tdiary/rack/auth.rb
tdiary-5.0.5 lib/tdiary/rack/auth.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/tdiary-5.0.3/lib/tdiary/rack/auth.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/lib/tdiary/rack/auth.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.3/lib/tdiary/rack/auth.rb
tdiary-5.0.4 vendor/bundle/gems/tdiary-5.0.3/lib/tdiary/rack/auth.rb
tdiary-5.0.4 lib/tdiary/rack/auth.rb
tdiary-5.0.3 lib/tdiary/rack/auth.rb
tdiary-5.0.2 lib/tdiary/rack/auth.rb
tdiary-5.0.1 lib/tdiary/rack/auth.rb
tdiary-5.0.0 lib/tdiary/rack/auth.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/tdiary-4.2.0/lib/tdiary/rack/auth.rb
tdiary-4.2.1 lib/tdiary/rack/auth.rb
tdiary-4.2.0 lib/tdiary/rack/auth.rb
tdiary-4.1.3 lib/tdiary/rack/auth.rb
tdiary-4.1.2 lib/tdiary/rack/auth.rb