Class: CasrackTheAuthenticator::RequireCAS
- Inherits:
-
Object
- Object
- CasrackTheAuthenticator::RequireCAS
- Defined in:
- lib/casrack_the_authenticator/require_cas.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RequireCAS
constructor
Create a new RequireCAS middleware, which requires users to log in via CAS for all requests, and returns a 401 Unauthorized if they aren’t signed in.
Constructor Details
#initialize(app) ⇒ RequireCAS
Create a new RequireCAS middleware, which requires users to log in via CAS for all requests, and returns a 401 Unauthorized if they aren’t signed in.
10 11 12 |
# File 'lib/casrack_the_authenticator/require_cas.rb', line 10 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/casrack_the_authenticator/require_cas.rb', line 14 def call(env) if signed_in?(env) @app.call(env) else end end |