From 3da8833410a4e2d5a33f7cc1c3a46f786071fbd8 Mon Sep 17 00:00:00 2001 From: Robert Barrow Date: Wed, 29 May 2019 23:18:38 +0100 Subject: [PATCH] add parameter constraints for callback controller --- controllers/authorization.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controllers/authorization.rb b/controllers/authorization.rb index 45b93863..c016476d 100644 --- a/controllers/authorization.rb +++ b/controllers/authorization.rb @@ -5,7 +5,10 @@ class CustomWizard::AuthorizationController < ::ApplicationController :verify_authenticity_token def callback - # TODO: work out which service it relates to! + + params.require(:service) + params.require(:code) + CustomWizard::Authorization.set_code(service, params[:code]) CustomWizard::Authorization.get_access_token(service) end