Class: Proctoring::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/proctoring/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#authenticate_api_tokenObject



9
10
11
12
13
# File 'app/controllers/proctoring/application_controller.rb', line 9

def authenticate_api_token
  return if request.headers['Api-Secret'] == Proctoring.hundred_ms_webhook_secret

  render json: { success: false, error: 'You are not an authorized person.' }, status: :unauthorized
end

#authenticate_app_tokenObject



5
6
7
# File 'app/controllers/proctoring/application_controller.rb', line 5

def authenticate_app_token
  token_valid? request.headers['Token']
end