Class: Proctoring::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Proctoring::ApplicationController
show all
- Defined in:
- app/controllers/proctoring/application_controller.rb
Instance Method Summary
collapse
Instance Method Details
#authenticate_api_token ⇒ Object
9
10
11
12
13
|
# File 'app/controllers/proctoring/application_controller.rb', line 9
def authenticate_api_token
return if request.['Api-Secret'] == Proctoring.hundred_ms_webhook_secret
render json: { success: false, error: 'You are not an authorized person.' }, status: :unauthorized
end
|
#authenticate_app_token ⇒ Object
5
6
7
|
# File 'app/controllers/proctoring/application_controller.rb', line 5
def authenticate_app_token
token_valid? request.['Token']
end
|