{"action":"closed","number":38,"pull_request":{"url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/pulls/38","id":171244926,"html_url":"https://github.com/s-KaiNet/node-sp-auth/pull/38","diff_url":"https://github.com/s-KaiNet/node-sp-auth/pull/38.diff","patch_url":"https://github.com/s-KaiNet/node-sp-auth/pull/38.patch","issue_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/issues/38","number":38,"state":"closed","locked":false,"title":"OnDemand: optional TTL and electron script formatting","user":{"login":"koltyakov","id":7816483,"avatar_url":"https://avatars2.githubusercontent.com/u/7816483?v=4","gravatar_id":"","url":"https://api.github.com/users/koltyakov","html_url":"https://github.com/koltyakov","followers_url":"https://api.github.com/users/koltyakov/followers","following_url":"https://api.github.com/users/koltyakov/following{/other_user}","gists_url":"https://api.github.com/users/koltyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/koltyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koltyakov/subscriptions","organizations_url":"https://api.github.com/users/koltyakov/orgs","repos_url":"https://api.github.com/users/koltyakov/repos","events_url":"https://api.github.com/users/koltyakov/events{/privacy}","received_events_url":"https://api.github.com/users/koltyakov/received_events","type":"User","site_admin":false},"body":"PR introduces optional TTL setting for OnDemand auth strategy. Also, some minor style fixes have been applied to electron main.js.\r\n\r\n## Premises\r\n\r\nOn one of the projects, we experience a tricky situation with On-Prem ADFS auth, there a service is probably misconfigured with a customer, auth fails with 307 temporary redirect status code, and we can't affect on the settings. On-Demand auth works like a charm and a real day saver.\r\n\r\nYet, there are some challenges with On-Demand, which we've faced. Timeout is extremely short, around 10-15 minutes or so. And it happens that node-sp-auth expect persisted cookie to be valid, while it's already expired. Requests ended up with 401/403 after a while and we got to delete a file with saved cookie manually each time to get a possibility to authenticate.\r\n\r\nI've decided to apply an optional TTL in minutes to get a capability tweak it. It can be a better experience entering OnDemand creds into the popup and continue a process than, stopping a process, deleting persisted cookie file and restart.\r\n\r\nNot a perfect I know. I'm thinking about some sort of refreshing by opening electron window for a moment and prolong the session or something, yet not found a solution.\r\n\r\n@s-KaiNet, could you please take a look at apply changes? They are really minor right now but bring TTL configuration possibility.\r\n","created_at":"2018-02-25T18:49:57Z","updated_at":"2018-03-01T17:21:43Z","closed_at":"2018-03-01T17:21:43Z","merged_at":"2018-03-01T17:21:43Z","merge_commit_sha":"985692e5010513e3c95d6f918a38ae285318ce63","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/pulls/38/commits","review_comments_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/pulls/38/comments","review_comment_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/pulls/comments{/number}","comments_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/issues/38/comments","statuses_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/statuses/985692e5010513e3c95d6f918a38ae285318ce63","head":{"label":"koltyakov:dev","ref":"dev","sha":"985692e5010513e3c95d6f918a38ae285318ce63","user":{"login":"koltyakov","id":7816483,"avatar_url":"https://avatars2.githubusercontent.com/u/7816483?v=4","gravatar_id":"","url":"https://api.github.com/users/koltyakov","html_url":"https://github.com/koltyakov","followers_url":"https://api.github.com/users/koltyakov/followers","following_url":"https://api.github.com/users/koltyakov/following{/other_user}","gists_url":"https://api.github.com/users/koltyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/koltyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koltyakov/subscriptions","organizations_url":"https://api.github.com/users/koltyakov/orgs","repos_url":"https://api.github.com/users/koltyakov/repos","events_url":"https://api.github.com/users/koltyakov/events{/privacy}","received_events_url":"https://api.github.com/users/koltyakov/received_events","type":"User","site_admin":false},"repo":{"id":82839097,"name":"node-sp-auth","full_name":"koltyakov/node-sp-auth","owner":{"login":"koltyakov","id":7816483,"avatar_url":"https://avatars2.githubusercontent.com/u/7816483?v=4","gravatar_id":"","url":"https://api.github.com/users/koltyakov","html_url":"https://github.com/koltyakov","followers_url":"https://api.github.com/users/koltyakov/followers","following_url":"https://api.github.com/users/koltyakov/following{/other_user}","gists_url":"https://api.github.com/users/koltyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/koltyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koltyakov/subscriptions","organizations_url":"https://api.github.com/users/koltyakov/orgs","repos_url":"https://api.github.com/users/koltyakov/repos","events_url":"https://api.github.com/users/koltyakov/events{/privacy}","received_events_url":"https://api.github.com/users/koltyakov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/koltyakov/node-sp-auth","description":"Unattended SharePoint http authentication with nodejs","fork":true,"url":"https://api.github.com/repos/koltyakov/node-sp-auth","forks_url":"https://api.github.com/repos/koltyakov/node-sp-auth/forks","keys_url":"https://api.github.com/repos/koltyakov/node-sp-auth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koltyakov/node-sp-auth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koltyakov/node-sp-auth/teams","hooks_url":"https://api.github.com/repos/koltyakov/node-sp-auth/hooks","issue_events_url":"https://api.github.com/repos/koltyakov/node-sp-auth/issues/events{/number}","events_url":"https://api.github.com/repos/koltyakov/node-sp-auth/events","assignees_url":"https://api.github.com/repos/koltyakov/node-sp-auth/assignees{/user}","branches_url":"https://api.github.com/repos/koltyakov/node-sp-auth/branches{/branch}","tags_url":"https://api.github.com/repos/koltyakov/node-sp-auth/tags","blobs_url":"https://api.github.com/repos/koltyakov/node-sp-auth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koltyakov/node-sp-auth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koltyakov/node-sp-auth/git/refs{/sha}","trees_url":"https://api.github.com/repos/koltyakov/node-sp-auth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koltyakov/node-sp-auth/statuses/{sha}","languages_url":"https://api.github.com/repos/koltyakov/node-sp-auth/languages","stargazers_url":"https://api.github.com/repos/koltyakov/node-sp-auth/stargazers","contributors_url":"https://api.github.com/repos/koltyakov/node-sp-auth/contributors","subscribers_url":"https://api.github.com/repos/koltyakov/node-sp-auth/subscribers","subscription_url":"https://api.github.com/repos/koltyakov/node-sp-auth/subscription","commits_url":"https://api.github.com/repos/koltyakov/node-sp-auth/commits{/sha}","git_commits_url":"https://api.github.com/repos/koltyakov/node-sp-auth/git/commits{/sha}","comments_url":"https://api.github.com/repos/koltyakov/node-sp-auth/comments{/number}","issue_comment_url":"https://api.github.com/repos/koltyakov/node-sp-auth/issues/comments{/number}","contents_url":"https://api.github.com/repos/koltyakov/node-sp-auth/contents/{+path}","compare_url":"https://api.github.com/repos/koltyakov/node-sp-auth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koltyakov/node-sp-auth/merges","archive_url":"https://api.github.com/repos/koltyakov/node-sp-auth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koltyakov/node-sp-auth/downloads","issues_url":"https://api.github.com/repos/koltyakov/node-sp-auth/issues{/number}","pulls_url":"https://api.github.com/repos/koltyakov/node-sp-auth/pulls{/number}","milestones_url":"https://api.github.com/repos/koltyakov/node-sp-auth/milestones{/number}","notifications_url":"https://api.github.com/repos/koltyakov/node-sp-auth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koltyakov/node-sp-auth/labels{/name}","releases_url":"https://api.github.com/repos/koltyakov/node-sp-auth/releases{/id}","deployments_url":"https://api.github.com/repos/koltyakov/node-sp-auth/deployments","created_at":"2017-02-22T18:31:57Z","updated_at":"2017-02-22T18:31:58Z","pushed_at":"2018-02-25T18:33:27Z","git_url":"git://github.com/koltyakov/node-sp-auth.git","ssh_url":"git@github.com:koltyakov/node-sp-auth.git","clone_url":"https://github.com/koltyakov/node-sp-auth.git","svn_url":"https://github.com/koltyakov/node-sp-auth","homepage":"","size":298,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"s-KaiNet:dev","ref":"dev","sha":"4064d1e8a268a3024783a66e4f480ac1b0aca15c","user":{"login":"s-KaiNet","id":10658276,"avatar_url":"https://avatars3.githubusercontent.com/u/10658276?v=4","gravatar_id":"","url":"https://api.github.com/users/s-KaiNet","html_url":"https://github.com/s-KaiNet","followers_url":"https://api.github.com/users/s-KaiNet/followers","following_url":"https://api.github.com/users/s-KaiNet/following{/other_user}","gists_url":"https://api.github.com/users/s-KaiNet/gists{/gist_id}","starred_url":"https://api.github.com/users/s-KaiNet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-KaiNet/subscriptions","organizations_url":"https://api.github.com/users/s-KaiNet/orgs","repos_url":"https://api.github.com/users/s-KaiNet/repos","events_url":"https://api.github.com/users/s-KaiNet/events{/privacy}","received_events_url":"https://api.github.com/users/s-KaiNet/received_events","type":"User","site_admin":false},"repo":{"id":32420746,"name":"node-sp-auth","full_name":"s-KaiNet/node-sp-auth","owner":{"login":"s-KaiNet","id":10658276,"avatar_url":"https://avatars3.githubusercontent.com/u/10658276?v=4","gravatar_id":"","url":"https://api.github.com/users/s-KaiNet","html_url":"https://github.com/s-KaiNet","followers_url":"https://api.github.com/users/s-KaiNet/followers","following_url":"https://api.github.com/users/s-KaiNet/following{/other_user}","gists_url":"https://api.github.com/users/s-KaiNet/gists{/gist_id}","starred_url":"https://api.github.com/users/s-KaiNet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-KaiNet/subscriptions","organizations_url":"https://api.github.com/users/s-KaiNet/orgs","repos_url":"https://api.github.com/users/s-KaiNet/repos","events_url":"https://api.github.com/users/s-KaiNet/events{/privacy}","received_events_url":"https://api.github.com/users/s-KaiNet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/s-KaiNet/node-sp-auth","description":"Unattended SharePoint http authentication with nodejs","fork":false,"url":"https://api.github.com/repos/s-KaiNet/node-sp-auth","forks_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/forks","keys_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/teams","hooks_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/hooks","issue_events_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/issues/events{/number}","events_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/events","assignees_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/assignees{/user}","branches_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/branches{/branch}","tags_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/tags","blobs_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/git/refs{/sha}","trees_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/statuses/{sha}","languages_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/languages","stargazers_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/stargazers","contributors_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/contributors","subscribers_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/subscribers","subscription_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/subscription","commits_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/commits{/sha}","git_commits_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/git/commits{/sha}","comments_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/comments{/number}","issue_comment_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/issues/comments{/number}","contents_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/contents/{+path}","compare_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/merges","archive_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/downloads","issues_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/issues{/number}","pulls_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/pulls{/number}","milestones_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/milestones{/number}","notifications_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/labels{/name}","releases_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/releases{/id}","deployments_url":"https://api.github.com/repos/s-KaiNet/node-sp-auth/deployments","created_at":"2015-03-17T21:13:35Z","updated_at":"2018-02-18T12:32:29Z","pushed_at":"2018-03-01T17:21:43Z","git_url":"git://github.com/s-KaiNet/node-sp-auth.git","ssh_url":"git@github.com:s-KaiNet/node-sp-auth.git","clone_url":"https://github.com/s-KaiNet/node-sp-auth.git","svn_url":"https://github.com/s-KaiNet/node-sp-auth","homepage":"","size":287,"stargazers_count":48,"watchers_count":48,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":14,"open_issues":0,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/s-KaiNet/node-sp-auth/pulls/38"},"html":{"href":"https://github.com/s-KaiNet/node-sp-auth/pull/38"},"issue":{"href":"https://api.github.com/repos/s-KaiNet/node-sp-auth/issues/38"},"comments":{"href":"https://api.github.com/repos/s-KaiNet/node-sp-auth/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/s-KaiNet/node-sp-auth/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/s-KaiNet/node-sp-auth/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/s-KaiNet/node-sp-auth/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/s-KaiNet/node-sp-auth/statuses/985692e5010513e3c95d6f918a38ae285318ce63"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"s-KaiNet","id":10658276,"avatar_url":"https://avatars3.githubusercontent.com/u/10658276?v=4","gravatar_id":"","url":"https://api.github.com/users/s-KaiNet","html_url":"https://github.com/s-KaiNet","followers_url":"https://api.github.com/users/s-KaiNet/followers","following_url":"https://api.github.com/users/s-KaiNet/following{/other_user}","gists_url":"https://api.github.com/users/s-KaiNet/gists{/gist_id}","starred_url":"https://api.github.com/users/s-KaiNet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-KaiNet/subscriptions","organizations_url":"https://api.github.com/users/s-KaiNet/orgs","repos_url":"https://api.github.com/users/s-KaiNet/repos","events_url":"https://api.github.com/users/s-KaiNet/events{/privacy}","received_events_url":"https://api.github.com/users/s-KaiNet/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":46,"deletions":43,"changed_files":5}}
{"actor":{"display_login":"s-KaiNet"}}