Class: ArtsyAuth::Gravity

Inherits:
Rack::Auth::AbstractHandler
  • Object
show all
Defined in:
lib/artsy_auth/gravity.rb

Overview

An authentication library that uses the JWT and Artsy Oauth to verify whether someone using a site is an admin.

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



37
38
39
40
41
# File 'lib/artsy_auth/gravity.rb', line 37

def call(env)
  return authorize(env) if env['REQUEST_PATH'] == '/auth'
  return @app.call(env) if valid?(env)
  unauthorized
end