Class: Goliath::Rack::Auth::Krb::BasicAndNego
- Inherits:
-
Object
- Object
- Goliath::Rack::Auth::Krb::BasicAndNego
- Includes:
- Goliath::Rack::AsyncMiddleware
- Defined in:
- lib/goliath/rack/auth/krb/basic_and_nego.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, realm, keytab, service = nil) ⇒ BasicAndNego
constructor
A new instance of BasicAndNego.
- #post_process(env, status, headers, body, additional_headers) ⇒ Object
Constructor Details
#initialize(app, realm, keytab, service = nil) ⇒ BasicAndNego
Returns a new instance of BasicAndNego.
12 13 14 15 16 17 |
# File 'lib/goliath/rack/auth/krb/basic_and_nego.rb', line 12 def initialize(app, realm, keytab, service=nil) @app = app @realm = realm @keytab = keytab @service = service end |
Instance Method Details
#call(env) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/goliath/rack/auth/krb/basic_and_nego.rb', line 19 def call(env) a = ::BasicAndNego::Processor.new(env, env.logger, @realm, @keytab, @service) a.process_request return a.response if a.response super(env, a.headers) end |
#post_process(env, status, headers, body, additional_headers) ⇒ Object
28 29 30 |
# File 'lib/goliath/rack/auth/krb/basic_and_nego.rb', line 28 def post_process(env, status, headers, body, additional_headers) [status, headers.merge(additional_headers), body] end |