Skip to content

Commit

Permalink
Disable temporaly soap ws authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
Senen committed Dec 20, 2017
1 parent f4d76c2 commit 6afb2c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 1 addition & 3 deletions app/controllers/api/responsible_statements_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
module Api
class ResponsibleStatementsController < ApplicationController
soap_service namespace: "urn:api/responsible_statements/wsdl",
wsdl_style: :rpc,
wsse_username: "username",
wsse_password: "password"
wsdl_style: :rpc

before_filter :parse_request, only: :inicioExpediente
soap_action "inicioExpediente",
Expand Down
5 changes: 4 additions & 1 deletion spec/requests/api/responsible_statements_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

describe "Authentication" do
it "Should deny access when no username defined" do
skip "Until authentication reactivation"
client = Savon::Client.new(
wsdl: application_base + api_responsible_statements_wsdl_path,
wsse_auth: ["", "password"])
Expand All @@ -22,6 +23,7 @@
end

it "Should deny access when no password defined" do
skip "Until authentication reactivation"
client = Savon::Client.new(
wsdl: application_base + api_responsible_statements_wsdl_path,
wsse_auth: ["username", ""])
Expand All @@ -30,12 +32,13 @@
end

it "Should deny access when bad usernmae and password supplied" do
skip "Until authentication reactivation"
client = Savon::Client.new(
wsdl: application_base + api_responsible_statements_wsdl_path,
wsse_auth: ["other_username", "bad_password"])

expect { client.call(:inicio_expediente, message: {}) }.to raise_error(Savon::SOAPFault, '(Server) Unauthorized')
end
end

it "Should accept conections when password and user well defined" do
client = Savon::Client.new(
Expand Down

0 comments on commit 6afb2c4

Please sign in to comment.