Class: HasuraHandler::AuthHookController
Instance Method Summary
collapse
#protect_against_forgery?
Instance Method Details
#get_mode ⇒ Object
5
6
7
8
|
# File 'app/controllers/hasura_handler/auth_hook_controller.rb', line 5
def get_mode
@headers = .to_h.select{ |k,v| k =~ /\AHTTP_/ }.to_h
authenticate
end
|
#post_mode ⇒ Object
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| ['HTTP_' + k.to_s.gsub('-', '_').upcase, v] }.
to_h
authenticate
end
|