Class: HasuraHandler::AuthHookController

Inherits:
ApplicationController show all
Defined in:
app/controllers/hasura_handler/auth_hook_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#protect_against_forgery?

Instance Method Details

#get_modeObject



5
6
7
8
# File 'app/controllers/hasura_handler/auth_hook_controller.rb', line 5

def get_mode
  @headers = clean_headers
  authenticate
end

#post_modeObject



10
11
12
13
14
15
16
17
# File 'app/controllers/hasura_handler/auth_hook_controller.rb', line 10

def post_mode
  @headers = raw_params['headers'].
    to_h.
    map{ |k,v| [standardize_header(k), v] }.
    to_h

  authenticate
end