{"action":"created","comment":{"url":"https://api.github.com/repos/bryanjos/joken/pulls/comments/181236592","pull_request_review_id":111810546,"id":181236592,"diff_hunk":"@@ -0,0 +1,13 @@\n+defmodule Joken.CurrentTime.OS do","path":"lib/joken/current_time.ex","position":1,"original_position":1,"commit_id":"007917ca12694d12e65488151c1d52eed6b5a69d","original_commit_id":"007917ca12694d12e65488151c1d52eed6b5a69d","user":{"login":"bryanjos","id":1257573,"avatar_url":"https://avatars3.githubusercontent.com/u/1257573?v=4","gravatar_id":"","url":"https://api.github.com/users/bryanjos","html_url":"https://github.com/bryanjos","followers_url":"https://api.github.com/users/bryanjos/followers","following_url":"https://api.github.com/users/bryanjos/following{/other_user}","gists_url":"https://api.github.com/users/bryanjos/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanjos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanjos/subscriptions","organizations_url":"https://api.github.com/users/bryanjos/orgs","repos_url":"https://api.github.com/users/bryanjos/repos","events_url":"https://api.github.com/users/bryanjos/events{/privacy}","received_events_url":"https://api.github.com/users/bryanjos/received_events","type":"User","site_admin":false},"body":"Can we get rid of this now and use Elixir's built in functions? https://hexdocs.pm/elixir/DateTime.html#to_unix/2. Only they are equivalent","created_at":"2018-04-12T22:09:08Z","updated_at":"2018-04-12T22:11:23Z","html_url":"https://github.com/bryanjos/joken/pull/185#discussion_r181236592","pull_request_url":"https://api.github.com/repos/bryanjos/joken/pulls/185","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/bryanjos/joken/pulls/comments/181236592"},"html":{"href":"https://github.com/bryanjos/joken/pull/185#discussion_r181236592"},"pull_request":{"href":"https://api.github.com/repos/bryanjos/joken/pulls/185"}}},"pull_request":{"url":"https://api.github.com/repos/bryanjos/joken/pulls/185","id":178755923,"html_url":"https://github.com/bryanjos/joken/pull/185","diff_url":"https://github.com/bryanjos/joken/pull/185.diff","patch_url":"https://github.com/bryanjos/joken/pull/185.patch","issue_url":"https://api.github.com/repos/bryanjos/joken/issues/185","number":185,"state":"open","locked":false,"title":"Joken 2.0 initial commit","user":{"login":"victorolinasc","id":376386,"avatar_url":"https://avatars2.githubusercontent.com/u/376386?v=4","gravatar_id":"","url":"https://api.github.com/users/victorolinasc","html_url":"https://github.com/victorolinasc","followers_url":"https://api.github.com/users/victorolinasc/followers","following_url":"https://api.github.com/users/victorolinasc/following{/other_user}","gists_url":"https://api.github.com/users/victorolinasc/gists{/gist_id}","starred_url":"https://api.github.com/users/victorolinasc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorolinasc/subscriptions","organizations_url":"https://api.github.com/users/victorolinasc/orgs","repos_url":"https://api.github.com/users/victorolinasc/repos","events_url":"https://api.github.com/users/victorolinasc/events{/privacy}","received_events_url":"https://api.github.com/users/victorolinasc/received_events","type":"User","site_admin":false},"body":"This is the long talked about Joken 2.0.0 PR. This is a different API and therefore we would like more opinions on the current status.\r\n\r\nJoken 2.0 brings:\r\n\r\n- A less confusing API: dynamic vs static claims confusion.\r\n- Portable and encapsulated configuration: we recommend the module approach here where you can add your functionality at will.\r\n- Better error handling and messages following the approach by [Michal Muskala](http://michal.muskala.eu/2017/02/10/error-handling-in-elixir-libraries.html).\r\n- Signers can be configured through mix.config and so be different for each environment.\r\n- Big performance impact measured against current implementation and other JWT libraries out there.\r\n- Property tested (just a bit at least).\r\n- Hooks mechanism for extensibility (logging and so on).\r\n- Better docs with some guides on common questions: signer configuration, public/private key confusion and so on.\r\n- Time mock for testing time relative things.\r\n- Jason module for JOSE.\r\n\r\nThis is an early on implementation with some things still missing. Here is a by all means not complete list of TODOs:\r\n\r\n- [ ] Discuss which options we should support in `Joken.Claim`. These could include: optinal, error message and so on.\r\n- [ ] Discuss having a better hooks plugging mechanism. It should be possible to add more than one hook without overriding functions. We could append hooks at compile time and just call one by one during execution time.\r\n- [ ] Check JWKS with dynamic keys (should look at other APIs... we could use Guardian's implementation and update our key configuration guide).\r\n- [ ] Preload all keys in application bootstrap so that we can fail early and have a map with already parsed keys.\r\n- [ ] Another full pass on documentation.\r\n- [ ] Typespec everything with better typespecs (internal types for better documentation).\r\n- [ ] Logo?\r\n- [ ] Include HTML reports for benchmarks (Benchee HTML).\r\n- [ ] Create 1.x branch.\r\n- [ ] Clean CHANGELOG pointing to 1.x branch if the user wants to check it out.\r\n- [ ] Reach at least 90% coverage.\r\n- [ ] See if the optimizations for [`Poison`](https://github.com/potatosalad/erlang-jose/blob/master/lib/jose/poison/lexical_encoder.ex) json module can be used with `Jason`. This is certainly a hot path for `JOSE`.\r\n- [ ] Discuss putting the override of base64url on a library (**IMPORTANT!!!**).\r\n- [ ] Discuss Joken.Plug (should we keep it here or document a better way of handling this like Mithril??).\r\n- [ ] Discuss an API for parsing token into known struct (maybe implemented as a hook?).\r\n- [ ] Discuss having a repository for benchmarking all other types of token libraries (Guardian, AuthSecret and so on)\r\n- [ ] Discuss making samples in another repository.\r\n- [ ] Discuss having an organization in Github for managing all that.\r\n- [ ] Missing guides:\r\n  - [ ] Differences with Phoenix.Token\r\n  - [ ] Differences with using raw JOSE\r\n  - [ ] Key configuration (WIP)\r\n  - [ ] Testing\r\n\r\nThis is what I've came up with up to now. I'm sure more things will arise while doing the remaining tasks.\r\n\r\nCheers,","created_at":"2018-04-02T00:45:47Z","updated_at":"2018-04-12T22:11:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9fa4ae6f7a313d960ac394864279da1d734f6ea6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/bryanjos/joken/milestones/1","html_url":"https://github.com/bryanjos/joken/milestone/1","labels_url":"https://api.github.com/repos/bryanjos/joken/milestones/1/labels","id":3233694,"number":1,"title":"2.0.0","description":null,"creator":{"login":"victorolinasc","id":376386,"avatar_url":"https://avatars2.githubusercontent.com/u/376386?v=4","gravatar_id":"","url":"https://api.github.com/users/victorolinasc","html_url":"https://github.com/victorolinasc","followers_url":"https://api.github.com/users/victorolinasc/followers","following_url":"https://api.github.com/users/victorolinasc/following{/other_user}","gists_url":"https://api.github.com/users/victorolinasc/gists{/gist_id}","starred_url":"https://api.github.com/users/victorolinasc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorolinasc/subscriptions","organizations_url":"https://api.github.com/users/victorolinasc/orgs","repos_url":"https://api.github.com/users/victorolinasc/repos","events_url":"https://api.github.com/users/victorolinasc/events{/privacy}","received_events_url":"https://api.github.com/users/victorolinasc/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2018-04-02T00:46:24Z","updated_at":"2018-04-02T00:53:36Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/bryanjos/joken/pulls/185/commits","review_comments_url":"https://api.github.com/repos/bryanjos/joken/pulls/185/comments","review_comment_url":"https://api.github.com/repos/bryanjos/joken/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bryanjos/joken/issues/185/comments","statuses_url":"https://api.github.com/repos/bryanjos/joken/statuses/007917ca12694d12e65488151c1d52eed6b5a69d","head":{"label":"victorolinasc:vn/joken2_poc","ref":"vn/joken2_poc","sha":"007917ca12694d12e65488151c1d52eed6b5a69d","user":{"login":"victorolinasc","id":376386,"avatar_url":"https://avatars2.githubusercontent.com/u/376386?v=4","gravatar_id":"","url":"https://api.github.com/users/victorolinasc","html_url":"https://github.com/victorolinasc","followers_url":"https://api.github.com/users/victorolinasc/followers","following_url":"https://api.github.com/users/victorolinasc/following{/other_user}","gists_url":"https://api.github.com/users/victorolinasc/gists{/gist_id}","starred_url":"https://api.github.com/users/victorolinasc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorolinasc/subscriptions","organizations_url":"https://api.github.com/users/victorolinasc/orgs","repos_url":"https://api.github.com/users/victorolinasc/repos","events_url":"https://api.github.com/users/victorolinasc/events{/privacy}","received_events_url":"https://api.github.com/users/victorolinasc/received_events","type":"User","site_admin":false},"repo":{"id":35610132,"name":"joken","full_name":"victorolinasc/joken","owner":{"login":"victorolinasc","id":376386,"avatar_url":"https://avatars2.githubusercontent.com/u/376386?v=4","gravatar_id":"","url":"https://api.github.com/users/victorolinasc","html_url":"https://github.com/victorolinasc","followers_url":"https://api.github.com/users/victorolinasc/followers","following_url":"https://api.github.com/users/victorolinasc/following{/other_user}","gists_url":"https://api.github.com/users/victorolinasc/gists{/gist_id}","starred_url":"https://api.github.com/users/victorolinasc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorolinasc/subscriptions","organizations_url":"https://api.github.com/users/victorolinasc/orgs","repos_url":"https://api.github.com/users/victorolinasc/repos","events_url":"https://api.github.com/users/victorolinasc/events{/privacy}","received_events_url":"https://api.github.com/users/victorolinasc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/victorolinasc/joken","description":"Elixir JWT library","fork":true,"url":"https://api.github.com/repos/victorolinasc/joken","forks_url":"https://api.github.com/repos/victorolinasc/joken/forks","keys_url":"https://api.github.com/repos/victorolinasc/joken/keys{/key_id}","collaborators_url":"https://api.github.com/repos/victorolinasc/joken/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/victorolinasc/joken/teams","hooks_url":"https://api.github.com/repos/victorolinasc/joken/hooks","issue_events_url":"https://api.github.com/repos/victorolinasc/joken/issues/events{/number}","events_url":"https://api.github.com/repos/victorolinasc/joken/events","assignees_url":"https://api.github.com/repos/victorolinasc/joken/assignees{/user}","branches_url":"https://api.github.com/repos/victorolinasc/joken/branches{/branch}","tags_url":"https://api.github.com/repos/victorolinasc/joken/tags","blobs_url":"https://api.github.com/repos/victorolinasc/joken/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/victorolinasc/joken/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/victorolinasc/joken/git/refs{/sha}","trees_url":"https://api.github.com/repos/victorolinasc/joken/git/trees{/sha}","statuses_url":"https://api.github.com/repos/victorolinasc/joken/statuses/{sha}","languages_url":"https://api.github.com/repos/victorolinasc/joken/languages","stargazers_url":"https://api.github.com/repos/victorolinasc/joken/stargazers","contributors_url":"https://api.github.com/repos/victorolinasc/joken/contributors","subscribers_url":"https://api.github.com/repos/victorolinasc/joken/subscribers","subscription_url":"https://api.github.com/repos/victorolinasc/joken/subscription","commits_url":"https://api.github.com/repos/victorolinasc/joken/commits{/sha}","git_commits_url":"https://api.github.com/repos/victorolinasc/joken/git/commits{/sha}","comments_url":"https://api.github.com/repos/victorolinasc/joken/comments{/number}","issue_comment_url":"https://api.github.com/repos/victorolinasc/joken/issues/comments{/number}","contents_url":"https://api.github.com/repos/victorolinasc/joken/contents/{+path}","compare_url":"https://api.github.com/repos/victorolinasc/joken/compare/{base}...{head}","merges_url":"https://api.github.com/repos/victorolinasc/joken/merges","archive_url":"https://api.github.com/repos/victorolinasc/joken/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/victorolinasc/joken/downloads","issues_url":"https://api.github.com/repos/victorolinasc/joken/issues{/number}","pulls_url":"https://api.github.com/repos/victorolinasc/joken/pulls{/number}","milestones_url":"https://api.github.com/repos/victorolinasc/joken/milestones{/number}","notifications_url":"https://api.github.com/repos/victorolinasc/joken/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/victorolinasc/joken/labels{/name}","releases_url":"https://api.github.com/repos/victorolinasc/joken/releases{/id}","deployments_url":"https://api.github.com/repos/victorolinasc/joken/deployments","created_at":"2015-05-14T12:34:12Z","updated_at":"2018-02-06T12:38:18Z","pushed_at":"2018-04-02T00:31:21Z","git_url":"git://github.com/victorolinasc/joken.git","ssh_url":"git@github.com:victorolinasc/joken.git","clone_url":"https://github.com/victorolinasc/joken.git","svn_url":"https://github.com/victorolinasc/joken","homepage":null,"size":391,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bryanjos:master","ref":"master","sha":"d934340d58fe3e69f3d8da88eef532f588b15786","user":{"login":"bryanjos","id":1257573,"avatar_url":"https://avatars3.githubusercontent.com/u/1257573?v=4","gravatar_id":"","url":"https://api.github.com/users/bryanjos","html_url":"https://github.com/bryanjos","followers_url":"https://api.github.com/users/bryanjos/followers","following_url":"https://api.github.com/users/bryanjos/following{/other_user}","gists_url":"https://api.github.com/users/bryanjos/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanjos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanjos/subscriptions","organizations_url":"https://api.github.com/users/bryanjos/orgs","repos_url":"https://api.github.com/users/bryanjos/repos","events_url":"https://api.github.com/users/bryanjos/events{/privacy}","received_events_url":"https://api.github.com/users/bryanjos/received_events","type":"User","site_admin":false},"repo":{"id":24107016,"name":"joken","full_name":"bryanjos/joken","owner":{"login":"bryanjos","id":1257573,"avatar_url":"https://avatars3.githubusercontent.com/u/1257573?v=4","gravatar_id":"","url":"https://api.github.com/users/bryanjos","html_url":"https://github.com/bryanjos","followers_url":"https://api.github.com/users/bryanjos/followers","following_url":"https://api.github.com/users/bryanjos/following{/other_user}","gists_url":"https://api.github.com/users/bryanjos/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanjos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanjos/subscriptions","organizations_url":"https://api.github.com/users/bryanjos/orgs","repos_url":"https://api.github.com/users/bryanjos/repos","events_url":"https://api.github.com/users/bryanjos/events{/privacy}","received_events_url":"https://api.github.com/users/bryanjos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bryanjos/joken","description":"Elixir JWT library","fork":false,"url":"https://api.github.com/repos/bryanjos/joken","forks_url":"https://api.github.com/repos/bryanjos/joken/forks","keys_url":"https://api.github.com/repos/bryanjos/joken/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bryanjos/joken/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bryanjos/joken/teams","hooks_url":"https://api.github.com/repos/bryanjos/joken/hooks","issue_events_url":"https://api.github.com/repos/bryanjos/joken/issues/events{/number}","events_url":"https://api.github.com/repos/bryanjos/joken/events","assignees_url":"https://api.github.com/repos/bryanjos/joken/assignees{/user}","branches_url":"https://api.github.com/repos/bryanjos/joken/branches{/branch}","tags_url":"https://api.github.com/repos/bryanjos/joken/tags","blobs_url":"https://api.github.com/repos/bryanjos/joken/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bryanjos/joken/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bryanjos/joken/git/refs{/sha}","trees_url":"https://api.github.com/repos/bryanjos/joken/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bryanjos/joken/statuses/{sha}","languages_url":"https://api.github.com/repos/bryanjos/joken/languages","stargazers_url":"https://api.github.com/repos/bryanjos/joken/stargazers","contributors_url":"https://api.github.com/repos/bryanjos/joken/contributors","subscribers_url":"https://api.github.com/repos/bryanjos/joken/subscribers","subscription_url":"https://api.github.com/repos/bryanjos/joken/subscription","commits_url":"https://api.github.com/repos/bryanjos/joken/commits{/sha}","git_commits_url":"https://api.github.com/repos/bryanjos/joken/git/commits{/sha}","comments_url":"https://api.github.com/repos/bryanjos/joken/comments{/number}","issue_comment_url":"https://api.github.com/repos/bryanjos/joken/issues/comments{/number}","contents_url":"https://api.github.com/repos/bryanjos/joken/contents/{+path}","compare_url":"https://api.github.com/repos/bryanjos/joken/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bryanjos/joken/merges","archive_url":"https://api.github.com/repos/bryanjos/joken/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bryanjos/joken/downloads","issues_url":"https://api.github.com/repos/bryanjos/joken/issues{/number}","pulls_url":"https://api.github.com/repos/bryanjos/joken/pulls{/number}","milestones_url":"https://api.github.com/repos/bryanjos/joken/milestones{/number}","notifications_url":"https://api.github.com/repos/bryanjos/joken/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bryanjos/joken/labels{/name}","releases_url":"https://api.github.com/repos/bryanjos/joken/releases{/id}","deployments_url":"https://api.github.com/repos/bryanjos/joken/deployments","created_at":"2014-09-16T16:08:56Z","updated_at":"2018-04-12T20:22:20Z","pushed_at":"2018-04-02T00:45:48Z","git_url":"git://github.com/bryanjos/joken.git","ssh_url":"git@github.com:bryanjos/joken.git","clone_url":"https://github.com/bryanjos/joken.git","svn_url":"https://github.com/bryanjos/joken","homepage":null,"size":337,"stargazers_count":368,"watchers_count":368,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":49,"open_issues":8,"watchers":368,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bryanjos/joken/pulls/185"},"html":{"href":"https://github.com/bryanjos/joken/pull/185"},"issue":{"href":"https://api.github.com/repos/bryanjos/joken/issues/185"},"comments":{"href":"https://api.github.com/repos/bryanjos/joken/issues/185/comments"},"review_comments":{"href":"https://api.github.com/repos/bryanjos/joken/pulls/185/comments"},"review_comment":{"href":"https://api.github.com/repos/bryanjos/joken/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bryanjos/joken/pulls/185/commits"},"statuses":{"href":"https://api.github.com/repos/bryanjos/joken/statuses/007917ca12694d12e65488151c1d52eed6b5a69d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"bryanjos"}}