kumar303/mohawk — pull request #3 by jcwilson (2014-05-07 18:54:21+00:00)
Title: calculate a ts mac and provide it on the TokenExpire exception

This will allow receivers to send back a secure timestamp so senders can calculate and apply a local timestamp offset on subsequent requests.

It actually creates the WWW-Authenticate header contents of the form

Hawk ts="{ts}", tsm="{tsm}", error="{error}

as expected by the sender.

Reference:
https://github.com/hueniverse/hawk/blob/v2.2.0/lib/client.js#L147
https://github.com/hueniverse/hawk/blob/v2.2.0/lib/utils.js#L100

Sorry I didn't write tests, but I thought this could at least get you started.