{"action":"created","issue":{"url":"https://api.github.com/repos/hueniverse/hawk/issues/200","repository_url":"https://api.github.com/repos/hueniverse/hawk","labels_url":"https://api.github.com/repos/hueniverse/hawk/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/hueniverse/hawk/issues/200/comments","events_url":"https://api.github.com/repos/hueniverse/hawk/issues/200/events","html_url":"https://github.com/hueniverse/hawk/issues/200","id":176931416,"number":200,"title":"sntp undefined","user":{"login":"McPo","id":1295034,"avatar_url":"https://avatars.githubusercontent.com/u/1295034?v=3","gravatar_id":"","url":"https://api.github.com/users/McPo","html_url":"https://github.com/McPo","followers_url":"https://api.github.com/users/McPo/followers","following_url":"https://api.github.com/users/McPo/following{/other_user}","gists_url":"https://api.github.com/users/McPo/gists{/gist_id}","starred_url":"https://api.github.com/users/McPo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/McPo/subscriptions","organizations_url":"https://api.github.com/users/McPo/orgs","repos_url":"https://api.github.com/users/McPo/repos","events_url":"https://api.github.com/users/McPo/events{/privacy}","received_events_url":"https://api.github.com/users/McPo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-14T15:01:13Z","updated_at":"2016-09-14T19:05:00Z","closed_at":"2016-09-14T19:05:00Z","body":"Hi,\r\n\r\nIve currently have hawk up and working (in electron+webpack), however I was hoping to add sntp support incase a clients clock is incorrect. However when accessing the hawk.sntp, it returns as undefined.\r\n\r\nsntp is exported within lib/index.js and the main of the package is set to the lib/index.js. I have noticed that hawk.sntp is not defined within dist/browser.\r\n\r\nI have tried both importing and requring hawk.\r\n\r\nAny idea what might be the issue.\r\n\r\nThanks,\r\nEmmet"},"comment":{"url":"https://api.github.com/repos/hueniverse/hawk/issues/comments/247120364","html_url":"https://github.com/hueniverse/hawk/issues/200#issuecomment-247120364","issue_url":"https://api.github.com/repos/hueniverse/hawk/issues/200","id":247120364,"user":{"login":"hueniverse","id":56631,"avatar_url":"https://avatars.githubusercontent.com/u/56631?v=3","gravatar_id":"","url":"https://api.github.com/users/hueniverse","html_url":"https://github.com/hueniverse","followers_url":"https://api.github.com/users/hueniverse/followers","following_url":"https://api.github.com/users/hueniverse/following{/other_user}","gists_url":"https://api.github.com/users/hueniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/hueniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hueniverse/subscriptions","organizations_url":"https://api.github.com/users/hueniverse/orgs","repos_url":"https://api.github.com/users/hueniverse/repos","events_url":"https://api.github.com/users/hueniverse/events{/privacy}","received_events_url":"https://api.github.com/users/hueniverse/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T19:05:00Z","updated_at":"2016-09-14T19:05:00Z","body":"You can't use sntp in the browser. You need a UDP connection which is not available. This is why sntp is not available to you in the browser dist. Hawk has a way for the server to inform the client about clock skew and for the client to validate this information and then store it for future use. You can look at the test for `client.authenticate()` https://github.com/hueniverse/hawk/blob/master/test/browser.js#L915"}}
{"actor":{"display_login":"hueniverse"}}