{"action":"created","issue":{"url":"https://api.github.com/repos/cmv/cmv-app/issues/487","labels_url":"https://api.github.com/repos/cmv/cmv-app/issues/487/labels{/name}","comments_url":"https://api.github.com/repos/cmv/cmv-app/issues/487/comments","events_url":"https://api.github.com/repos/cmv/cmv-app/issues/487/events","html_url":"https://github.com/cmv/cmv-app/issues/487","id":118513820,"number":487,"title":"Implement session timeout","user":{"login":"husenk","id":10217971,"avatar_url":"https://avatars.githubusercontent.com/u/10217971?v=3","gravatar_id":"","url":"https://api.github.com/users/husenk","html_url":"https://github.com/husenk","followers_url":"https://api.github.com/users/husenk/followers","following_url":"https://api.github.com/users/husenk/following{/other_user}","gists_url":"https://api.github.com/users/husenk/gists{/gist_id}","starred_url":"https://api.github.com/users/husenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/husenk/subscriptions","organizations_url":"https://api.github.com/users/husenk/orgs","repos_url":"https://api.github.com/users/husenk/repos","events_url":"https://api.github.com/users/husenk/events{/privacy}","received_events_url":"https://api.github.com/users/husenk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-24T01:43:26Z","updated_at":"2015-11-25T21:43:06Z","closed_at":null,"body":"Hi all\r\nI am using secured services and has implemented sign in and sign out functionality. I am looking if anyone here has implemented session timeout. What I want to achieve is sign out automatically (esri.id.destroyCredentials) when the session is idle for certain period.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/cmv/cmv-app/issues/comments/159737701","html_url":"https://github.com/cmv/cmv-app/issues/487#issuecomment-159737701","issue_url":"https://api.github.com/repos/cmv/cmv-app/issues/487","id":159737701,"user":{"login":"tmcgee","id":200780,"avatar_url":"https://avatars.githubusercontent.com/u/200780?v=3","gravatar_id":"","url":"https://api.github.com/users/tmcgee","html_url":"https://github.com/tmcgee","followers_url":"https://api.github.com/users/tmcgee/followers","following_url":"https://api.github.com/users/tmcgee/following{/other_user}","gists_url":"https://api.github.com/users/tmcgee/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcgee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcgee/subscriptions","organizations_url":"https://api.github.com/users/tmcgee/orgs","repos_url":"https://api.github.com/users/tmcgee/repos","events_url":"https://api.github.com/users/tmcgee/events{/privacy}","received_events_url":"https://api.github.com/users/tmcgee/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T21:43:06Z","updated_at":"2015-11-25T21:43:06Z","body":"Ok. Perhaps you could add something like the following to your current code that resets the idleTimer. This is completely untested but in theory it should destroy the credentials after 10 minutes of no mouse movement.\r\n\r\n``` javascript\r\nvar minutes = 10;\r\nif (this.myTimer) {\r\n    clearTimeout(this.myTimer);\r\n}\r\nthis.myTimer = setTimeout(function(){\r\n    esri.id.destroyCredentials();\r\n}, (minutes * 60 * 1000));\r\n```"}}