{"action":"created","comment":{"url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/comments/197056477","pull_request_review_id":130721605,"id":197056477,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzA1NjQ3Nw==","diff_hunk":"@@ -166,19 +193,58 @@ class TestTypeSafeToken : XCTestCase {\n         guard let profileInstance1 = TestFacebookToken.decodeFacebookResponse(data: testFacebookResponse) else {\n             return XCTFail(\"Facebook JSON response cannot be decoded to TestFacebookToken\")\n         }\n-        guard let profileInstance2 = FacebookTokenProfile.decodeFacebookResponse(data: testFacebookResponse) else {\n-            return XCTFail(\"Facebook JSON response cannot be decoded to FacebookTokenProfile\")\n+        guard let profileInstance2 = TestFacebookToken.decodeFacebookResponse(data: testFacebookResponse) else {\n+            return XCTFail(\"Facebook JSON response cannot be decoded to TestFacebookToken\")","path":"Tests/CredentialsFacebookTests/TestTypeSafeToken.swift","position":55,"original_position":55,"commit_id":"c93ece50ea881c1d473adb0ebccc58385b23fe98","original_commit_id":"c93ece50ea881c1d473adb0ebccc58385b23fe98","user":{"login":"djones6","id":17850918,"node_id":"MDQ6VXNlcjE3ODUwOTE4","avatar_url":"https://avatars0.githubusercontent.com/u/17850918?v=4","gravatar_id":"","url":"https://api.github.com/users/djones6","html_url":"https://github.com/djones6","followers_url":"https://api.github.com/users/djones6/followers","following_url":"https://api.github.com/users/djones6/following{/other_user}","gists_url":"https://api.github.com/users/djones6/gists{/gist_id}","starred_url":"https://api.github.com/users/djones6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djones6/subscriptions","organizations_url":"https://api.github.com/users/djones6/orgs","repos_url":"https://api.github.com/users/djones6/repos","events_url":"https://api.github.com/users/djones6/events{/privacy}","received_events_url":"https://api.github.com/users/djones6/received_events","type":"User","site_admin":false},"body":"This was a mistake in the original test which I thought I'd fix while I was here.  The test is meant to insert two tokens into the same cache, and since the cache is associated with the type, the two tokens need to be instances of the same type.","created_at":"2018-06-21T08:51:03Z","updated_at":"2018-06-21T08:51:03Z","html_url":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook/pull/44#discussion_r197056477","pull_request_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/44","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/comments/197056477"},"html":{"href":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook/pull/44#discussion_r197056477"},"pull_request":{"href":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/44","id":196168728,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2MTY4NzI4","html_url":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook/pull/44","diff_url":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook/pull/44.diff","patch_url":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook/pull/44.patch","issue_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/issues/44","number":44,"state":"open","locked":false,"title":"Enable limit on token cache size","user":{"login":"djones6","id":17850918,"node_id":"MDQ6VXNlcjE3ODUwOTE4","avatar_url":"https://avatars0.githubusercontent.com/u/17850918?v=4","gravatar_id":"","url":"https://api.github.com/users/djones6","html_url":"https://github.com/djones6","followers_url":"https://api.github.com/users/djones6/followers","following_url":"https://api.github.com/users/djones6/following{/other_user}","gists_url":"https://api.github.com/users/djones6/gists{/gist_id}","starred_url":"https://api.github.com/users/djones6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djones6/subscriptions","organizations_url":"https://api.github.com/users/djones6/orgs","repos_url":"https://api.github.com/users/djones6/repos","events_url":"https://api.github.com/users/djones6/events{/privacy}","received_events_url":"https://api.github.com/users/djones6/received_events","type":"User","site_admin":false},"body":"This PR adds a `static var cacheSize: Int` to the `TypeSafeFacebookToken` protocol and provides a default implementation of `0` (unlimited cache size, which is the existing behaviour).\r\n\r\nThe user can choose to define a `static var cacheSize = n` on their type, to limit the cache to at most `n` entries. This may be desirable for situations where many distinct clients (ie. tokens) are encountered, to avoid unbounded memory growth, since this is an in-memory cache.","created_at":"2018-06-20T14:50:06Z","updated_at":"2018-06-21T08:51:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36eaad5f9b7790e7c43805295cc3ed1d5a3a8b0e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/44/commits","review_comments_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/44/comments","review_comment_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/issues/44/comments","statuses_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/statuses/c93ece50ea881c1d473adb0ebccc58385b23fe98","head":{"label":"IBM-Swift:cacheSize","ref":"cacheSize","sha":"c93ece50ea881c1d473adb0ebccc58385b23fe98","user":{"login":"IBM-Swift","id":16882981,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODgyOTgx","avatar_url":"https://avatars3.githubusercontent.com/u/16882981?v=4","gravatar_id":"","url":"https://api.github.com/users/IBM-Swift","html_url":"https://github.com/IBM-Swift","followers_url":"https://api.github.com/users/IBM-Swift/followers","following_url":"https://api.github.com/users/IBM-Swift/following{/other_user}","gists_url":"https://api.github.com/users/IBM-Swift/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-Swift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-Swift/subscriptions","organizations_url":"https://api.github.com/users/IBM-Swift/orgs","repos_url":"https://api.github.com/users/IBM-Swift/repos","events_url":"https://api.github.com/users/IBM-Swift/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-Swift/received_events","type":"Organization","site_admin":false},"repo":{"id":54966480,"node_id":"MDEwOlJlcG9zaXRvcnk1NDk2NjQ4MA==","name":"Kitura-CredentialsFacebook","full_name":"IBM-Swift/Kitura-CredentialsFacebook","owner":{"login":"IBM-Swift","id":16882981,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODgyOTgx","avatar_url":"https://avatars3.githubusercontent.com/u/16882981?v=4","gravatar_id":"","url":"https://api.github.com/users/IBM-Swift","html_url":"https://github.com/IBM-Swift","followers_url":"https://api.github.com/users/IBM-Swift/followers","following_url":"https://api.github.com/users/IBM-Swift/following{/other_user}","gists_url":"https://api.github.com/users/IBM-Swift/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-Swift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-Swift/subscriptions","organizations_url":"https://api.github.com/users/IBM-Swift/orgs","repos_url":"https://api.github.com/users/IBM-Swift/repos","events_url":"https://api.github.com/users/IBM-Swift/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-Swift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook","description":"A plugin for the Kitura-Credentials framework that authenticates using the Facebook web login","fork":false,"url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook","forks_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/forks","keys_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/teams","hooks_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/hooks","issue_events_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/issues/events{/number}","events_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/events","assignees_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/assignees{/user}","branches_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/branches{/branch}","tags_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/tags","blobs_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/statuses/{sha}","languages_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/languages","stargazers_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/stargazers","contributors_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/contributors","subscribers_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/subscribers","subscription_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/subscription","commits_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/contents/{+path}","compare_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/merges","archive_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/downloads","issues_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/issues{/number}","pulls_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls{/number}","milestones_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/milestones{/number}","notifications_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/labels{/name}","releases_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/releases{/id}","deployments_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/deployments","created_at":"2016-03-29T10:18:30Z","updated_at":"2018-06-18T09:20:11Z","pushed_at":"2018-06-20T16:11:51Z","git_url":"git://github.com/IBM-Swift/Kitura-CredentialsFacebook.git","ssh_url":"git@github.com:IBM-Swift/Kitura-CredentialsFacebook.git","clone_url":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook.git","svn_url":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook","homepage":null,"size":717,"stargazers_count":7,"watchers_count":7,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5,"open_issues":1,"watchers":7,"default_branch":"master"}},"base":{"label":"IBM-Swift:master","ref":"master","sha":"541082b9cd28279ce7a6d8e91bd614f2ce4e52d6","user":{"login":"IBM-Swift","id":16882981,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODgyOTgx","avatar_url":"https://avatars3.githubusercontent.com/u/16882981?v=4","gravatar_id":"","url":"https://api.github.com/users/IBM-Swift","html_url":"https://github.com/IBM-Swift","followers_url":"https://api.github.com/users/IBM-Swift/followers","following_url":"https://api.github.com/users/IBM-Swift/following{/other_user}","gists_url":"https://api.github.com/users/IBM-Swift/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-Swift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-Swift/subscriptions","organizations_url":"https://api.github.com/users/IBM-Swift/orgs","repos_url":"https://api.github.com/users/IBM-Swift/repos","events_url":"https://api.github.com/users/IBM-Swift/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-Swift/received_events","type":"Organization","site_admin":false},"repo":{"id":54966480,"node_id":"MDEwOlJlcG9zaXRvcnk1NDk2NjQ4MA==","name":"Kitura-CredentialsFacebook","full_name":"IBM-Swift/Kitura-CredentialsFacebook","owner":{"login":"IBM-Swift","id":16882981,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODgyOTgx","avatar_url":"https://avatars3.githubusercontent.com/u/16882981?v=4","gravatar_id":"","url":"https://api.github.com/users/IBM-Swift","html_url":"https://github.com/IBM-Swift","followers_url":"https://api.github.com/users/IBM-Swift/followers","following_url":"https://api.github.com/users/IBM-Swift/following{/other_user}","gists_url":"https://api.github.com/users/IBM-Swift/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-Swift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-Swift/subscriptions","organizations_url":"https://api.github.com/users/IBM-Swift/orgs","repos_url":"https://api.github.com/users/IBM-Swift/repos","events_url":"https://api.github.com/users/IBM-Swift/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-Swift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook","description":"A plugin for the Kitura-Credentials framework that authenticates using the Facebook web login","fork":false,"url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook","forks_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/forks","keys_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/teams","hooks_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/hooks","issue_events_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/issues/events{/number}","events_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/events","assignees_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/assignees{/user}","branches_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/branches{/branch}","tags_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/tags","blobs_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/statuses/{sha}","languages_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/languages","stargazers_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/stargazers","contributors_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/contributors","subscribers_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/subscribers","subscription_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/subscription","commits_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/contents/{+path}","compare_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/merges","archive_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/downloads","issues_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/issues{/number}","pulls_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls{/number}","milestones_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/milestones{/number}","notifications_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/labels{/name}","releases_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/releases{/id}","deployments_url":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/deployments","created_at":"2016-03-29T10:18:30Z","updated_at":"2018-06-18T09:20:11Z","pushed_at":"2018-06-20T16:11:51Z","git_url":"git://github.com/IBM-Swift/Kitura-CredentialsFacebook.git","ssh_url":"git@github.com:IBM-Swift/Kitura-CredentialsFacebook.git","clone_url":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook.git","svn_url":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook","homepage":null,"size":717,"stargazers_count":7,"watchers_count":7,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/44"},"html":{"href":"https://github.com/IBM-Swift/Kitura-CredentialsFacebook/pull/44"},"issue":{"href":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/issues/44"},"comments":{"href":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/IBM-Swift/Kitura-CredentialsFacebook/statuses/c93ece50ea881c1d473adb0ebccc58385b23fe98"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"djones6"}}