Class: FaspClient::ApplicationController
- Inherits:
-
Object
- Object
- FaspClient::ApplicationController
show all
- Defined in:
- app/controllers/fasp_client/application_controller.rb
Instance Method Summary
collapse
Instance Method Details
#fasp_client_controller? ⇒ Boolean
7
8
9
|
# File 'app/controllers/fasp_client/application_controller.rb', line 7
def fasp_client_controller?
true
end
|
#get_provider ⇒ Object
11
12
13
14
15
16
|
# File 'app/controllers/fasp_client/application_controller.rb', line 11
def get_provider
head :unauthorized and return unless request..key?("Signature-Input")
m = request.["Signature-Input"].match(/keyid=\"([^\"]+)\"/)
@provider = FaspClient::Provider.find_by(uuid: m[1]) if m
head :unauthorized if @provider.nil?
end
|
#verify_request ⇒ Object
18
19
20
|
# File 'app/controllers/fasp_client/application_controller.rb', line 18
def verify_request
head :unauthorized unless @provider.valid_request?(request)
end
|