{"action":"opened","number":5,"pull_request":{"url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/pulls/5","id":78508257,"html_url":"https://github.com/Microsoft/vsts-authentication-library-for-java/pull/5","diff_url":"https://github.com/Microsoft/vsts-authentication-library-for-java/pull/5.diff","patch_url":"https://github.com/Microsoft/vsts-authentication-library-for-java/pull/5.patch","issue_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/issues/5","number":5,"state":"open","locked":false,"title":"Add validation logic","user":{"login":"yacaovsnc","id":10119737,"avatar_url":"https://avatars.githubusercontent.com/u/10119737?v=3","gravatar_id":"","url":"https://api.github.com/users/yacaovsnc","html_url":"https://github.com/yacaovsnc","followers_url":"https://api.github.com/users/yacaovsnc/followers","following_url":"https://api.github.com/users/yacaovsnc/following{/other_user}","gists_url":"https://api.github.com/users/yacaovsnc/gists{/gist_id}","starred_url":"https://api.github.com/users/yacaovsnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yacaovsnc/subscriptions","organizations_url":"https://api.github.com/users/yacaovsnc/orgs","repos_url":"https://api.github.com/users/yacaovsnc/repos","events_url":"https://api.github.com/users/yacaovsnc/events{/privacy}","received_events_url":"https://api.github.com/users/yacaovsnc/received_events","type":"User","site_admin":false},"body":"Use the sample app as a base:\r\n1. Use OAuth2Authenticator with a secure, persistent TokenPair store. \r\n2. Comment out the sign out line.\r\nRun it once, verify we are prompted for login, and the oauth2 token is saved correctly in the storage.  \r\n3. Run the app again to verify we aren't prompted for login. \r\n4. Modify the saved AccessToken by hand to make it invalid (I did this on Mac OSX). \r\n4. Rerun the app and verify we are prompted again, and the original tokenPair is deleted from the storage.\r\n\r\nThis appears like we are not using the refresh token.  There is some investigation that has to happen first.  We actually refreshed the token, but the renewed AccessToken is not accompanied by a refreshToken, and we don't consider that is a successful retrival.  \r\n\r\nRepeat this process, but with a VstsPatAuthenticator with a secure, persistent Token store to verify we prompt when the PAT is invalid.","created_at":"2016-07-22T16:58:47Z","updated_at":"2016-07-22T16:58:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/issues/5/comments","statuses_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/statuses/7b04a503f57805548de3ed4432af04e4f49d9b64","head":{"label":"Microsoft:users/yacao/validatetoken","ref":"users/yacao/validatetoken","sha":"7b04a503f57805548de3ed4432af04e4f49d9b64","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":62155633,"name":"vsts-authentication-library-for-java","full_name":"Microsoft/vsts-authentication-library-for-java","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-authentication-library-for-java","description":"Retrieve OAuth2 or Personal Accesss Tokens for Visual Studio Team Services (visualstudio.com) accounts.  Also provides secure storage for those secrets on different platforms.","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java","forks_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/deployments","created_at":"2016-06-28T16:07:48Z","updated_at":"2016-06-30T12:41:19Z","pushed_at":"2016-07-22T16:30:33Z","git_url":"git://github.com/Microsoft/vsts-authentication-library-for-java.git","ssh_url":"git@github.com:Microsoft/vsts-authentication-library-for-java.git","clone_url":"https://github.com/Microsoft/vsts-authentication-library-for-java.git","svn_url":"https://github.com/Microsoft/vsts-authentication-library-for-java","homepage":null,"size":849,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"8da8b4a3b97241e6c4b3255d0e322cf70eff7298","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":62155633,"name":"vsts-authentication-library-for-java","full_name":"Microsoft/vsts-authentication-library-for-java","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-authentication-library-for-java","description":"Retrieve OAuth2 or Personal Accesss Tokens for Visual Studio Team Services (visualstudio.com) accounts.  Also provides secure storage for those secrets on different platforms.","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java","forks_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/deployments","created_at":"2016-06-28T16:07:48Z","updated_at":"2016-06-30T12:41:19Z","pushed_at":"2016-07-22T16:30:33Z","git_url":"git://github.com/Microsoft/vsts-authentication-library-for-java.git","ssh_url":"git@github.com:Microsoft/vsts-authentication-library-for-java.git","clone_url":"https://github.com/Microsoft/vsts-authentication-library-for-java.git","svn_url":"https://github.com/Microsoft/vsts-authentication-library-for-java","homepage":null,"size":849,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/pulls/5"},"html":{"href":"https://github.com/Microsoft/vsts-authentication-library-for-java/pull/5"},"issue":{"href":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/issues/5"},"comments":{"href":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vsts-authentication-library-for-java/statuses/7b04a503f57805548de3ed4432af04e4f49d9b64"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":228,"deletions":27,"changed_files":9}}
{"actor":{"display_login":"yacaovsnc"}}