Class: Spid::Rack::Login

Inherits:
Object
  • Object
show all
Defined in:
lib/spid/rack/login.rb

Overview

:nodoc:

Defined Under Namespace

Classes: LoginEnv

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Login

Returns a new instance of Login.



10
11
12
# File 'lib/spid/rack/login.rb', line 10

def initialize(app)
  @app = app
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



8
9
10
# File 'lib/spid/rack/login.rb', line 8

def app
  @app
end

Instance Method Details

#call(env) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/spid/rack/login.rb', line 14

def call(env)
  @sso = LoginEnv.new(env)

  return @sso.response if @sso.valid_request?

  app.call(env)
end