pcibraro / hawknet

Hawk protocol implementation for .NET
MIT License
114 stars 35 forks source link

Not working with attribute routing #27

Open 64Soft opened 10 years ago

64Soft commented 10 years ago

Hey,

Started using HawkNet on a new project where I can't use HTTPS, and it does the trick. However, I would like to use the Web API 2 "Attribute routing" feature in my project, but unfortunately it seems that this style of routing doesn't support the custom message handlers that are needed to implement HawkNet (ie the the handler that returns the HawkCredential). Is there any other way ? Or should I just stick with the classic routing system ?

Thanks

agilbert201 commented 10 years ago

I implemented an AuthorizationAttribute (vs custom message handler) and this works fine with attribute routing. This used to be in repo, got removed for some reason. Gist here https://gist.github.com/386beb86e2ca399e47f8.git but mileage will vary, and caveat emptor...

pcibraro commented 10 years ago

Thanks Andrew. I removed that attribute a while back for an issue when I migrated to Web API 2.0. I will use your implementation to add it back in the repo.

agilbert201 commented 10 years ago

Cool. Hopefully useful. This project has been most helpful!

Andrew Gilbert andy@agilbert.net (m) 802-535-1653 (h) 802-426-2108

On Aug 5, 2014, at 9:10 AM, Pablo Cibraro notifications@github.com wrote:

Thanks Andrew. I removed that attribute a while back for an issue when I migrated to Web API 2.0. I will use your implementation to add it back in the repo.

— Reply to this email directly or view it on GitHub.

64Soft commented 10 years ago

Many thanks guys

david-hollifield commented 9 years ago

@pcibraro Were you able to add this attribute back in? I'm not seeing it in the latest unless I'm missing something.