savonrb / akami

Building Web Service Security
MIT License
36 stars 61 forks source link

VerifySignature respects namespaces (and some refactoring) #11

Closed Envek closed 10 years ago

Envek commented 10 years ago
  1. Respect namespaces in document (whoa, they can be named differently!)
  2. Allow to change used namespaces (if anyone will ever need)
  3. Some refactoring, cleanup, and comments

Sorry, no tests yet (I've only idea to test it — to provide valid and invalid sample XMLs).

What do you think in common?

When I've tried to use Akami::WSSE::VerifySignature today, it wasn't working at all. I've fixed it and also did some refactoring (сould not resist the temptation). Now it works for messages I send and receive.

tjarratt commented 10 years ago

@Envek thanks for issuing this pull request. I don't have any context on this part of Akami so it's going to take me a few days to read your changes and have an informed decision.

I think your suggestion for testing (e.g.: providing valid and invalid sample XML) is a good way to test this. Let me know if you have any questions about that -- it seems pretty easy to test once you can generate some valid xml.

Envek commented 10 years ago

Added some tests for that with generated XMLs.

tjarratt commented 10 years ago

Thanks @Envek! I appreciate the comments and cleanup in the VerifySignature class -- I'm sure the next time I need to poke around in here to fix a bug it will be a lot easier now that there is a high level overview of what this does and how.