app/controllers/oauth2/authentication_controller.rb in vidibus-oauth2_server-0.0.3 vs app/controllers/oauth2/authentication_controller.rb in vidibus-oauth2_server-0.0.4
- old
+ new
@@ -27,10 +27,10 @@
protected
# Ensures that the type of flow is supported
def validate_oauth2_type!
- type = params[:type]
+ type = params[:type] || params[:response_type] || params[:grant_type]
raise Vidibus::Oauth2Server::MissingTypeError if type.blank?
raise Vidibus::Oauth2Server::UnsupportedTypeError unless Vidibus::Oauth2Server::FLOWS.include?(type)
end
# Ensures that given client id is valid