<HTML xmlns:o xmlns:mailto><HEAD><TITLE>Samsung Enterprise Portal mySingle</TITLE>
<META content=IE=5 http-equiv=X-UA-Compatible>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<STYLE id=mysingle_style type=text/css>P {
MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt; FONT-FAMILY: Arial, arial; MARGIN-TOP: 5px
}
TD {
MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt; FONT-FAMILY: Arial, arial; MARGIN-TOP: 5px
}
LI {
MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt; FONT-FAMILY: Arial, arial; MARGIN-TOP: 5px
}
BODY {
FONT-SIZE: 9pt; FONT-FAMILY: Arial, arial; MARGIN: 10px; LINE-HEIGHT: 1.4
}
</STYLE>
<META name=GENERATOR content=ActiveSquare></HEAD>
<BODY>
<P>Hi Ryan/ Stefan,<o:p></o:p></P>
<P> <o:p></o:p></P>
<P>I have built a local server, from your code in /example/usage.js of <A href="https://github.com/hueniverse/hawk"><SPAN style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin">https://github.com/hueniverse/hawk</SPAN></A><o:p></o:p></P>
<P>I debugged through the client and server code on how they calculate and validate the payload hash,<o:p></o:p></P>
<P>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<o:p></o:p></P>
<P>hash from payload.</P>
<P> From : https://github.com/hueniverse/hawk/blob/master/lib/server.js#L170<o:p></o:p></P>
<P>
<TABLE class=MsoTableGrid style="BORDER-TOP: windowtext 0px; BORDER-RIGHT: windowtext 0px; BORDER-COLLAPSE: collapse; BORDER-BOTTOM: windowtext 0px; BORDER-LEFT: windowtext 0px; border-image: none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" cellSpacing=0 cellPadding=0 border=1>
<TBODY>
<TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes">
<TD style="BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; WIDTH: 6.65in; BORDER-BOTTOM: windowtext 1pt solid; PADDING-BOTTOM: 0in; PADDING-TOP: 0in; PADDING-LEFT: 5.4pt; BORDER-LEFT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; border-image: none; mso-border-alt: solid windowtext .5pt" vAlign=top width=638><I style="mso-bidi-font-style: normal">
<P style='FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN: 0in 0in 0pt'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt">if (options.payload ||<o:p></o:p></SPAN></I></P>
<P style='FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN: 0in 0in 0pt'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>options.payload === '') {<o:p></o:p></SPAN></I></P>
<P style='FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN: 0in 0in 0pt'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>if (!attributes.hash) {<o:p></o:p></SPAN></I></P>
<P style='FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN: 0in 0in 0pt'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>return callback(Boom.unauthorized('Missing required payload hash', 'Hawk'), credentials, artifacts);<o:p></o:p></SPAN></I></P>
<P style='FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN: 0in 0in 0pt'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></I></P>
<P style='FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN: 0in 0in 0pt'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>var hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.contentType)<SPAN style="mso-tab-count: 1"> </SPAN><o:p></o:p></SPAN></I></P>
<P style='FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN: 0in 0in 0pt'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>if (!Cryptiles.fixedTimeComparison(hash, attributes.hash)) {<o:p></o:p></SPAN></I></P>
<P style='FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN: 0in 0in 0pt'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="BACKGROUND: yellow; mso-highlight: yellow">return callback(Boom.unauthorized('Bad payload hash', 'Hawk'), credentials, artifacts</SPAN>);<o:p></o:p></SPAN></I></P>
<P style='FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN: 0in 0in 0pt'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Calibri","sans-serif"; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA'><SPAN style="mso-spacerun: yes"> </SPAN>}</SPAN></I></I></P></TD></TR></TBODY></TABLE></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><o:p> </o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><SPAN style="BACKGROUND-COLOR: #98fb98">@Stefan</SPAN><o:p></o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'>“<SPAN style='FONT-SIZE: 9pt; FONT-FAMILY: "Arial","sans-serif"'>So if your code works with the examples, it should also work with requests like POST /v1/certificate/sign</SPAN>”<o:p></o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><SPAN style="BACKGROUND: yellow; mso-highlight: yellow">Manoj :</SPAN> Yes, I am trying to do the same now, I need help to figure out the params in server and client requests.<o:p></o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><o:p> </o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'>Here is my implementation by adding payload at the server end and changing the contentType to application/json and method to post.<BR>But ‘options’ (third parameter) is empty, so the validation is not happening.<o:p></o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><o:p> </o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'>Currently we don’t send either payload or hash to the server as the third parameter is empty.<BR>Could you please let me know what should be added to test for payload hash verification ?<o:p></o:p></P>
<P>
<TABLE class=MsoTableGrid style="BORDER-TOP: windowtext 0px; BORDER-RIGHT: windowtext 0px; BORDER-COLLAPSE: collapse; BORDER-BOTTOM: windowtext 0px; BORDER-LEFT: windowtext 0px; border-image: none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" cellSpacing=0 cellPadding=0 border=1>
<TBODY>
<TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes">
<TD style="BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; WIDTH: 6.65in; BORDER-BOTTOM: windowtext 1pt solid; PADDING-BOTTOM: 0in; PADDING-TOP: 0in; PADDING-LEFT: 5.4pt; BORDER-LEFT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; border-image: none; mso-border-alt: solid windowtext .5pt" vAlign=top width=638>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><o:p> </o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt">Hawk.server.authenticate(req, credentialsFunc, <SPAN style="BACKGROUND: yellow; mso-highlight: yellow">{ },</SPAN> function (err, credentials, artifacts) {<SPAN style="mso-tab-count: 2"> </SPAN><o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>var bodyString =<SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN>'{"publicKey":{"n":"118914442118587944337617760429415407384602982191049892815435313230898349895616980949965999312628028361498058274682246958387547150499585317279344413575574419269396469365814674292819599379624480603567156410797782487484670866208603048059842711401777345031666284642047683915624456602199119212316405809050063684547","e":"65537","algorithm":"RS"},"duration":43200000}';<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>var payload = (!err ? bodyString : 'Shoosh!');<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>var headers = {<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>'Content-Type': 'application/json',<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>'Server-Authorization': Hawk.server.header(credentials, artifacts, { payload: payload, contentType: 'application/json' })<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>};<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>res.writeHead(!err ? 200 : 401, headers);<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>res.end(payload);<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>});</SPAN></I><SPAN style="FONT-SIZE: 10pt"><BR style="mso-special-character: line-break"><!--[if !supportLineBreakNewLine]--><BR style="mso-special-character: line-break"></SPAN><SPAN style="FONT-SIZE: 12pt"><o:p></o:p></SPAN></P></TD></TR></TBODY></TABLE><o:p></o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'> </P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'>I have modified the client code header part to have <SPAN style="BACKGROUND-COLOR: #ffff00">mac and hashvalue</SPAN>,<o:p></o:p></P>
<P>
<TABLE class=MsoTableGrid style="BORDER-TOP: windowtext 0px; BORDER-RIGHT: windowtext 0px; BORDER-COLLAPSE: collapse; BORDER-BOTTOM: windowtext 0px; BORDER-LEFT: windowtext 0px; border-image: none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" cellSpacing=0 cellPadding=0 border=1>
<TBODY>
<TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes">
<TD style="BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; WIDTH: 6.65in; BORDER-BOTTOM: windowtext 1pt solid; PADDING-BOTTOM: 0in; PADDING-TOP: 0in; PADDING-LEFT: 5.4pt; BORDER-LEFT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; border-image: none; mso-border-alt: solid windowtext .5pt" vAlign=top width=638>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><o:p> </o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt">var calculatedHash = Hawk.crypto.calculatePayloadHash(bodyString, 'sha256', 'application/json');<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>var header = Hawk.client.header('http://127.0.0.1:8000/resource/1?b=1&a=2', 'POST', { credentials: credentials, hash: calculatedHash, mac:"33+lswVsme8sjEvSnrsf7DThiz+pwZEoVRQ6YjPcxZU=", contentType: 'application/json' });<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>var options = {<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>uri: 'http://127.0.0.1:8000/resource/1?b=1&a=2',<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>method: 'POST',<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>headers: {<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>authorization: header.field<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>};</SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>Request(options, function (error, response, body) {<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>process.exit(0);<o:p></o:p></SPAN></I></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt"><SPAN style="mso-spacerun: yes"> </SPAN>});</SPAN></I><o:p></o:p></P></TD></TR></TBODY></TABLE><o:p></o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'>Correct me if I am missing anything ?<o:p></o:p></P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'>It would be of great help if you guys guide me in solving this issue, as I am able to proceed to sync.</P>
<P style='MARGIN-BOTTOM: 0pt; FONT-SIZE: 11pt; TEXT-DECORATION: ; FONT-FAMILY: "Calibri","sans-serif"; MARGIN-RIGHT: 0in'>Thanks in advance !<o:p></o:p></P>
<P> </P>
<P>------- <B>Original Message</B> -------</P>
<P><B>Sender</B> : Ryan Kelly<rfkelly@mozilla.com></P>
<P><B>Date</B> : Oct 18, 2014 02:03 (GMT+05:30)</P>
<P><B>Title</B> : Re: Error in POST /v1/certificate/sign response.</P>
<P> </P>On 18/10/2014 3:57 AM, Stefan Arentz wrote:<BR>> <BR>> On Oct 17, 2014, at 3:27 AM, Manoj Kumar S <MANOJKUMAR.S@SAMSUNG.COM<BR>> <mailto:manojkumar.s@samsung.com>> wrote:<BR>> <BR>>> /"Did you run your unit tests against the example requests<BR>>> from https://github.com/hueniverse/hawk ?"/<BR>>><BR>>> Manoj : - I am completely unaware of sample request for<BR>>> /certificate/sign.<BR>>><BR>> <BR>> The example requests mentioned on https://github.com/hueniverse/hawk are<BR>> not FxA specific. They simply are example Hawk GET and POST requests<BR>> with known values so that you can test your code that makes the Hawk<BR>> signatures. So if your code works with the examples, it should also work<BR>> with requests like POST /v1/certificate/sign<BR><BR>In particular, make sure you've got all the details of payload<BR>verification working as document at:<BR><BR> https://github.com/hueniverse/hawk#payload-validation<BR><BR>IIRC your error message said something about "payload is invalid" so<BR>perhaps its tripping up when calculating the payload hash.<BR><BR><BR> Ryan<BR><BR>
<P> </P><!--SP:manojkumar.s-->
<P>Thanks,<BR>Manoj</P><!--manojkumar.s:EP-->
<P> </P>
<TABLE id=confidentialsignimg>
<TBODY>
<TR>
<TD NAMO_LOCK>
<P><IMG border=0 src="cid:XOK0LK7CT9SZ@namo.co.kr"></P></TD></TR></TBODY></TABLE></mailto:manojkumar.s@samsung.com></BODY></HTML><img src='http://ext.samsung.net/mailcheck/SeenTimeChecker?do=14f7afe1216e9674c77963393da2ddb49f7fae7c6a19350086905d89a565a6e55ae294939dd64ac078b72e7a65da3d59720175c7c1788460326bbdfb2ea96a2fcf878f9a26ce15a0' border=0 width=0 height=0 style='display:none'>