> On Oct 20, 2014, at 8:26 AM, Manoj Kumar S <[email protected]> wrote: > > Hi Ryan/ Stefan, > > I have built a local server, from your code in /example/usage.js of > https://github.com/hueniverse/hawk <https://github.com/hueniverse/hawk> > I debugged through the client and server code on how they calculate and > validate the payload hash, > As far as I understood, the error message "Payload is Invalid", happens when > server code compares the request hash ( sent as header by client ) with the > generated > hash from payload. >
Here are some examples (in Objective-C) to show what unit tests could look like: https://github.com/st3fan/bookmarks/blob/master/FirefoxAccountsTests/HawkCredentialsTest.m <https://github.com/st3fan/bookmarks/blob/master/FirefoxAccountsTests/HawkCredentialsTest.m> These are unit tests in Java: https://github.com/mozilla-services/android-sync/blob/develop/src/test/java/org/mozilla/gecko/sync/net/test/TestHawkAuthHeaderProvider.java <https://github.com/mozilla-services/android-sync/blob/develop/src/test/java/org/mozilla/gecko/sync/net/test/TestHawkAuthHeaderProvider.java> Both tests use the example Hawk vectors from https://github.com/hueniverse/hawk/blob/master/README.md#protocol-example S.
_______________________________________________ Dev-fxacct mailing list [email protected] https://mail.mozilla.org/listinfo/dev-fxacct

