imgix / imgix-objc

Official imgix Objective-C client.
MIT License
29 stars 3 forks source link

URL signing not working #5

Closed maxperry closed 8 years ago

maxperry commented 8 years ago

Looks like the URL signing has changed recently. In fact, the Iris library for Swift works instead. However, it cannot be imported "as-is" in an Objective-C project because there is no support for type structures. Therefore a fix would be really appreciated.

paulstraw commented 8 years ago

Hmm, URL signing hasn't been changed in our backend lately. Can you provide an example URL and/or code where you're seeing this?

maxperry commented 8 years ago

Could the Objective-C library not be calculating the signature correctly? Sorry but I cannot provide a URL due to sensitive data. The involved method is URLWithPath:

paulstraw commented 8 years ago

There are tests that validate signature generation, and they're still passing. I'll look into this more, but can you tell me whether you've specified any additional options on the instance of IGXClient you're using to generate the URLs?

maxperry commented 8 years ago

In fact, below is the URL being tested under the tests, but just like in the case of my images it's returning unauthorized. https://nothingmagical.imgix.net/sam.jpg?s=6925569b28658d7a7299f06d520a22dd I didn't set any options either.

paulstraw commented 8 years ago

Hmm. I'll dig into this soon.

paulstraw commented 8 years ago

Hey @maxperry, this should be fixed in master. Can you give it a shot and let me know how it works for you?

maxperry commented 8 years ago

It works fine now :) Thank you very much for fixing this!

paulstraw commented 8 years ago

Very cool. No problem!