Class: Rack::Cas::Client

Inherits:
Struct
  • Object
show all
Includes:
SessionStore::FileSystem
Defined in:
lib/rack/cas_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SessionStore::FileSystem

#delete_service_session_lookup, #filename_of_service_session_lookup, #read_service_session_lookup, #store_service_session_lookup

Instance Attribute Details

#appObject

Returns the value of attribute app

Returns:

  • (Object)

    the current value of app



59
60
61
# File 'lib/rack/cas_client.rb', line 59

def app
  @app
end

#memObject (readonly)

Returns the value of attribute mem.



61
62
63
# File 'lib/rack/cas_client.rb', line 61

def mem
  @mem
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



59
60
61
# File 'lib/rack/cas_client.rb', line 59

def options
  @options
end

Instance Method Details

#call(env) ⇒ Object



63
64
65
66
67
68
69
70
71
# File 'lib/rack/cas_client.rb', line 63

def call(env)
  if assets_request?(env);                         return app.call(env);                          end
  if logout_options = logout_request?(env);        return logout(*logout_options)                 end
  if request = sso_request?(env);                  return single_sign_out(request)                end
  if valid_session_options = authenticated?(env);  return valid_session(*valid_session_options)   end
  if xml_request?(env);                            return unauthorized_request                    end
    
  redirect_to_cas_for_authentication(env)
end