{"action":"created","comment":{"url":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/comments/38486328","id":38486328,"diff_hunk":"@@ -76,80 +69,110 @@\n     private long lastAccessedTime;\n     \n     /**\n-     * Creates a new Guacamole session associated with the given user context.\n+     * Creates a new Guacamole session associated with the given\n+     * AuthenticatedUser and UserContexts.\n      *\n      * @param environment\n      *     The environment of the Guacamole server associated with this new\n      *     session.\n      *\n-     * @param credentials\n-     *     The credentials provided by the user during login.\n+     * @param authenticatedUser\n+     *     The authenticated user to associate this session with.\n      *\n-     * @param userContext\n-     *     The user context to associate this session with.\n+     * @param userContexts\n+     *     The List of UserContexts to associate with this session.\n      *\n      * @throws GuacamoleException\n      *     If an error prevents the session from being created.\n      */\n-    public GuacamoleSession(Environment environment, Credentials credentials,\n-            UserContext userContext) throws GuacamoleException {\n+    public GuacamoleSession(Environment environment,\n+            AuthenticatedUser authenticatedUser,\n+            List<UserContext> userContexts)\n+            throws GuacamoleException {\n         this.lastAccessedTime = System.currentTimeMillis();\n-        this.credentials = credentials;\n-        this.userContext = userContext;\n+        this.authenticatedUser = authenticatedUser;\n+        this.userContexts = userContexts;\n     }\n \n     /**\n-     * Returns the credentials used when the user associated with this session\n-     * authenticated.\n+     * Returns the authenticated user associated with this session.\n      *\n      * @return\n-     *     The credentials used when the user associated with this session\n-     *     authenticated.\n+     *     The authenticated user associated with this session.\n      */\n-    public Credentials getCredentials() {\n-        return credentials;\n+    public AuthenticatedUser getAuthenticatedUser() {\n+        return authenticatedUser;\n     }\n \n     /**\n-     * Replaces the credentials associated with this session with the given\n-     * credentials.\n+     * Replaces the authenticated user associated with this session with the\n+     * given authenticated user.\n      *\n-     * @param credentials\n-     *     The credentials to associate with this session.\n+     * @param authenticatedUser\n+     *     The authenticated user to associated with this session.\n      */\n-    public void setCredentials(Credentials credentials) {\n-        this.credentials = credentials;\n+    public void setAuthenticatedUser(AuthenticatedUser authenticatedUser) {\n+        this.authenticatedUser = authenticatedUser;\n     }\n-    \n+\n     /**\n      * Returns the UserContext associated with this session.\n      *\n      * @return The UserContext associated with this session.\n      */\n     public UserContext getUserContext() {","path":"guacamole/src/main/java/org/glyptodon/guacamole/net/basic/GuacamoleSession.java","position":130,"original_position":130,"commit_id":"0d92876d23126207c8fbe267342b29bcab93531d","original_commit_id":"0d92876d23126207c8fbe267342b29bcab93531d","user":{"login":"jmuehlner","id":4633119,"avatar_url":"https://avatars.githubusercontent.com/u/4633119?v=3","gravatar_id":"","url":"https://api.github.com/users/jmuehlner","html_url":"https://github.com/jmuehlner","followers_url":"https://api.github.com/users/jmuehlner/followers","following_url":"https://api.github.com/users/jmuehlner/following{/other_user}","gists_url":"https://api.github.com/users/jmuehlner/gists{/gist_id}","starred_url":"https://api.github.com/users/jmuehlner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmuehlner/subscriptions","organizations_url":"https://api.github.com/users/jmuehlner/orgs","repos_url":"https://api.github.com/users/jmuehlner/repos","events_url":"https://api.github.com/users/jmuehlner/events{/privacy}","received_events_url":"https://api.github.com/users/jmuehlner/received_events","type":"User","site_admin":false},"body":"no @Deprecated?","created_at":"2015-09-01T23:51:15Z","updated_at":"2015-09-01T23:51:15Z","html_url":"https://github.com/glyptodon/guacamole-client/pull/250#discussion_r38486328","pull_request_url":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/250","_links":{"self":{"href":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/comments/38486328"},"html":{"href":"https://github.com/glyptodon/guacamole-client/pull/250#discussion_r38486328"},"pull_request":{"href":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/250"}}},"pull_request":{"url":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/250","id":43658628,"html_url":"https://github.com/glyptodon/guacamole-client/pull/250","diff_url":"https://github.com/glyptodon/guacamole-client/pull/250.diff","patch_url":"https://github.com/glyptodon/guacamole-client/pull/250.patch","issue_url":"https://api.github.com/repos/glyptodon/guacamole-client/issues/250","number":250,"state":"open","locked":false,"title":"GUAC-586: Load multiple AuthenticationProviders","user":{"login":"mike-jumper","id":4632905,"avatar_url":"https://avatars.githubusercontent.com/u/4632905?v=3","gravatar_id":"","url":"https://api.github.com/users/mike-jumper","html_url":"https://github.com/mike-jumper","followers_url":"https://api.github.com/users/mike-jumper/followers","following_url":"https://api.github.com/users/mike-jumper/following{/other_user}","gists_url":"https://api.github.com/users/mike-jumper/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-jumper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-jumper/subscriptions","organizations_url":"https://api.github.com/users/mike-jumper/orgs","repos_url":"https://api.github.com/users/mike-jumper/repos","events_url":"https://api.github.com/users/mike-jumper/events{/privacy}","received_events_url":"https://api.github.com/users/mike-jumper/received_events","type":"User","site_admin":false},"body":"This change allows Guacamole to load multiple `AuthenticationProvider` classes simultaneously - the foundation of [GUAC-586](https://glyptodon.org/jira/browse/GUAC-586). It does this through the following:\r\n\r\n1. Storing multiple `UserContext` in the `GuacamoleSession` - one for each `AuthenticationProvider`\r\n2. Allowing each `AuthenticationProvider` to take a crack at authenticating the user, as well as to trust the authentication process of other extensions by simply accepting the already-validated `AuthenticatedUser`.\r\n3. Distinguish between different `AuthenticationProvider` implementations by giving each a unique identifier.\r\n4. *Always* load the default (\"basic\") authentication, but tolerate any errors encountered.\r\n\r\nAs the system currently does not make use of the multiple `UserContext` objects within the session, the `UserContext` associated with the `AuthenticationProvider` which actually authenticated the current user is used. Until the function which actually supports multiple `UserContext` objects is used, and the old one is removed, the following message will be logged quite frequently:\r\n\r\n```\r\n****************************************************************\r\n\r\n       !!!!  PLEASE DO NOT USE getUserContext() !!!!\r\n\r\n getUserContext() has been replaced by getUserContexts(), which\r\n properly handles multiple authentication providers. All use of\r\n the old getUserContext() must be removed before GUAC-586 can\r\n be considered complete.\r\n\r\n****************************************************************\r\n```\r\n\r\nThis change has the added benefit of adding tolerance to the webapp startup process. It is now impossible for the web application to fail to start up, and result in zero login screen. The ultimate default behavior always falls back on the default auth, which is always loaded and cannot fail.\r\n\r\nEven if *all* your configuration files for Guacamole are completely invalid, the web application will still start up and display a login screen. You won't be able to log in, but hopefully that will lead you to check the logs, and see the errors.","created_at":"2015-08-28T18:41:21Z","updated_at":"2015-09-01T23:51:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1986a087bb36375e762a90f3e06dd313decc23f8","assignee":{"login":"jmuehlner","id":4633119,"avatar_url":"https://avatars.githubusercontent.com/u/4633119?v=3","gravatar_id":"","url":"https://api.github.com/users/jmuehlner","html_url":"https://github.com/jmuehlner","followers_url":"https://api.github.com/users/jmuehlner/followers","following_url":"https://api.github.com/users/jmuehlner/following{/other_user}","gists_url":"https://api.github.com/users/jmuehlner/gists{/gist_id}","starred_url":"https://api.github.com/users/jmuehlner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmuehlner/subscriptions","organizations_url":"https://api.github.com/users/jmuehlner/orgs","repos_url":"https://api.github.com/users/jmuehlner/repos","events_url":"https://api.github.com/users/jmuehlner/events{/privacy}","received_events_url":"https://api.github.com/users/jmuehlner/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/250/commits","review_comments_url":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/250/comments","review_comment_url":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/glyptodon/guacamole-client/issues/250/comments","statuses_url":"https://api.github.com/repos/glyptodon/guacamole-client/statuses/0d92876d23126207c8fbe267342b29bcab93531d","head":{"label":"glyptodon:multiple-ext","ref":"multiple-ext","sha":"0d92876d23126207c8fbe267342b29bcab93531d","user":{"login":"glyptodon","id":4632960,"avatar_url":"https://avatars.githubusercontent.com/u/4632960?v=3","gravatar_id":"","url":"https://api.github.com/users/glyptodon","html_url":"https://github.com/glyptodon","followers_url":"https://api.github.com/users/glyptodon/followers","following_url":"https://api.github.com/users/glyptodon/following{/other_user}","gists_url":"https://api.github.com/users/glyptodon/gists{/gist_id}","starred_url":"https://api.github.com/users/glyptodon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glyptodon/subscriptions","organizations_url":"https://api.github.com/users/glyptodon/orgs","repos_url":"https://api.github.com/users/glyptodon/repos","events_url":"https://api.github.com/users/glyptodon/events{/privacy}","received_events_url":"https://api.github.com/users/glyptodon/received_events","type":"Organization","site_admin":false},"repo":{"id":10532531,"name":"guacamole-client","full_name":"glyptodon/guacamole-client","owner":{"login":"glyptodon","id":4632960,"avatar_url":"https://avatars.githubusercontent.com/u/4632960?v=3","gravatar_id":"","url":"https://api.github.com/users/glyptodon","html_url":"https://github.com/glyptodon","followers_url":"https://api.github.com/users/glyptodon/followers","following_url":"https://api.github.com/users/glyptodon/following{/other_user}","gists_url":"https://api.github.com/users/glyptodon/gists{/gist_id}","starred_url":"https://api.github.com/users/glyptodon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glyptodon/subscriptions","organizations_url":"https://api.github.com/users/glyptodon/orgs","repos_url":"https://api.github.com/users/glyptodon/repos","events_url":"https://api.github.com/users/glyptodon/events{/privacy}","received_events_url":"https://api.github.com/users/glyptodon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/glyptodon/guacamole-client","description":"The HTML5/JavaScript Guacamole client, its containing web application, and related components.","fork":false,"url":"https://api.github.com/repos/glyptodon/guacamole-client","forks_url":"https://api.github.com/repos/glyptodon/guacamole-client/forks","keys_url":"https://api.github.com/repos/glyptodon/guacamole-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glyptodon/guacamole-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glyptodon/guacamole-client/teams","hooks_url":"https://api.github.com/repos/glyptodon/guacamole-client/hooks","issue_events_url":"https://api.github.com/repos/glyptodon/guacamole-client/issues/events{/number}","events_url":"https://api.github.com/repos/glyptodon/guacamole-client/events","assignees_url":"https://api.github.com/repos/glyptodon/guacamole-client/assignees{/user}","branches_url":"https://api.github.com/repos/glyptodon/guacamole-client/branches{/branch}","tags_url":"https://api.github.com/repos/glyptodon/guacamole-client/tags","blobs_url":"https://api.github.com/repos/glyptodon/guacamole-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glyptodon/guacamole-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glyptodon/guacamole-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/glyptodon/guacamole-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glyptodon/guacamole-client/statuses/{sha}","languages_url":"https://api.github.com/repos/glyptodon/guacamole-client/languages","stargazers_url":"https://api.github.com/repos/glyptodon/guacamole-client/stargazers","contributors_url":"https://api.github.com/repos/glyptodon/guacamole-client/contributors","subscribers_url":"https://api.github.com/repos/glyptodon/guacamole-client/subscribers","subscription_url":"https://api.github.com/repos/glyptodon/guacamole-client/subscription","commits_url":"https://api.github.com/repos/glyptodon/guacamole-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/glyptodon/guacamole-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/glyptodon/guacamole-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/glyptodon/guacamole-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/glyptodon/guacamole-client/contents/{+path}","compare_url":"https://api.github.com/repos/glyptodon/guacamole-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glyptodon/guacamole-client/merges","archive_url":"https://api.github.com/repos/glyptodon/guacamole-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glyptodon/guacamole-client/downloads","issues_url":"https://api.github.com/repos/glyptodon/guacamole-client/issues{/number}","pulls_url":"https://api.github.com/repos/glyptodon/guacamole-client/pulls{/number}","milestones_url":"https://api.github.com/repos/glyptodon/guacamole-client/milestones{/number}","notifications_url":"https://api.github.com/repos/glyptodon/guacamole-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glyptodon/guacamole-client/labels{/name}","releases_url":"https://api.github.com/repos/glyptodon/guacamole-client/releases{/id}","created_at":"2013-06-06T17:45:24Z","updated_at":"2015-09-01T19:06:40Z","pushed_at":"2015-09-01T08:45:56Z","git_url":"git://github.com/glyptodon/guacamole-client.git","ssh_url":"git@github.com:glyptodon/guacamole-client.git","clone_url":"https://github.com/glyptodon/guacamole-client.git","svn_url":"https://github.com/glyptodon/guacamole-client","homepage":"http://guac-dev.org/","size":15320,"stargazers_count":605,"watchers_count":605,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":136,"mirror_url":null,"open_issues_count":8,"forks":136,"open_issues":8,"watchers":605,"default_branch":"master"}},"base":{"label":"glyptodon:master","ref":"master","sha":"185fb201a821bf1ec9e6cd4ec3eb016eaefbcc81","user":{"login":"glyptodon","id":4632960,"avatar_url":"https://avatars.githubusercontent.com/u/4632960?v=3","gravatar_id":"","url":"https://api.github.com/users/glyptodon","html_url":"https://github.com/glyptodon","followers_url":"https://api.github.com/users/glyptodon/followers","following_url":"https://api.github.com/users/glyptodon/following{/other_user}","gists_url":"https://api.github.com/users/glyptodon/gists{/gist_id}","starred_url":"https://api.github.com/users/glyptodon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glyptodon/subscriptions","organizations_url":"https://api.github.com/users/glyptodon/orgs","repos_url":"https://api.github.com/users/glyptodon/repos","events_url":"https://api.github.com/users/glyptodon/events{/privacy}","received_events_url":"https://api.github.com/users/glyptodon/received_events","type":"Organization","site_admin":false},"repo":{"id":10532531,"name":"guacamole-client","full_name":"glyptodon/guacamole-client","owner":{"login":"glyptodon","id":4632960,"avatar_url":"https://avatars.githubusercontent.com/u/4632960?v=3","gravatar_id":"","url":"https://api.github.com/users/glyptodon","html_url":"https://github.com/glyptodon","followers_url":"https://api.github.com/users/glyptodon/followers","following_url":"https://api.github.com/users/glyptodon/following{/other_user}","gists_url":"https://api.github.com/users/glyptodon/gists{/gist_id}","starred_url":"https://api.github.com/users/glyptodon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glyptodon/subscriptions","organizations_url":"https://api.github.com/users/glyptodon/orgs","repos_url":"https://api.github.com/users/glyptodon/repos","events_url":"https://api.github.com/users/glyptodon/events{/privacy}","received_events_url":"https://api.github.com/users/glyptodon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/glyptodon/guacamole-client","description":"The HTML5/JavaScript Guacamole client, its containing web application, and related components.","fork":false,"url":"https://api.github.com/repos/glyptodon/guacamole-client","forks_url":"https://api.github.com/repos/glyptodon/guacamole-client/forks","keys_url":"https://api.github.com/repos/glyptodon/guacamole-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glyptodon/guacamole-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glyptodon/guacamole-client/teams","hooks_url":"https://api.github.com/repos/glyptodon/guacamole-client/hooks","issue_events_url":"https://api.github.com/repos/glyptodon/guacamole-client/issues/events{/number}","events_url":"https://api.github.com/repos/glyptodon/guacamole-client/events","assignees_url":"https://api.github.com/repos/glyptodon/guacamole-client/assignees{/user}","branches_url":"https://api.github.com/repos/glyptodon/guacamole-client/branches{/branch}","tags_url":"https://api.github.com/repos/glyptodon/guacamole-client/tags","blobs_url":"https://api.github.com/repos/glyptodon/guacamole-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glyptodon/guacamole-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glyptodon/guacamole-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/glyptodon/guacamole-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glyptodon/guacamole-client/statuses/{sha}","languages_url":"https://api.github.com/repos/glyptodon/guacamole-client/languages","stargazers_url":"https://api.github.com/repos/glyptodon/guacamole-client/stargazers","contributors_url":"https://api.github.com/repos/glyptodon/guacamole-client/contributors","subscribers_url":"https://api.github.com/repos/glyptodon/guacamole-client/subscribers","subscription_url":"https://api.github.com/repos/glyptodon/guacamole-client/subscription","commits_url":"https://api.github.com/repos/glyptodon/guacamole-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/glyptodon/guacamole-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/glyptodon/guacamole-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/glyptodon/guacamole-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/glyptodon/guacamole-client/contents/{+path}","compare_url":"https://api.github.com/repos/glyptodon/guacamole-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glyptodon/guacamole-client/merges","archive_url":"https://api.github.com/repos/glyptodon/guacamole-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glyptodon/guacamole-client/downloads","issues_url":"https://api.github.com/repos/glyptodon/guacamole-client/issues{/number}","pulls_url":"https://api.github.com/repos/glyptodon/guacamole-client/pulls{/number}","milestones_url":"https://api.github.com/repos/glyptodon/guacamole-client/milestones{/number}","notifications_url":"https://api.github.com/repos/glyptodon/guacamole-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glyptodon/guacamole-client/labels{/name}","releases_url":"https://api.github.com/repos/glyptodon/guacamole-client/releases{/id}","created_at":"2013-06-06T17:45:24Z","updated_at":"2015-09-01T19:06:40Z","pushed_at":"2015-09-01T08:45:56Z","git_url":"git://github.com/glyptodon/guacamole-client.git","ssh_url":"git@github.com:glyptodon/guacamole-client.git","clone_url":"https://github.com/glyptodon/guacamole-client.git","svn_url":"https://github.com/glyptodon/guacamole-client","homepage":"http://guac-dev.org/","size":15320,"stargazers_count":605,"watchers_count":605,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":136,"mirror_url":null,"open_issues_count":8,"forks":136,"open_issues":8,"watchers":605,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/250"},"html":{"href":"https://github.com/glyptodon/guacamole-client/pull/250"},"issue":{"href":"https://api.github.com/repos/glyptodon/guacamole-client/issues/250"},"comments":{"href":"https://api.github.com/repos/glyptodon/guacamole-client/issues/250/comments"},"review_comments":{"href":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/250/comments"},"review_comment":{"href":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/glyptodon/guacamole-client/pulls/250/commits"},"statuses":{"href":"https://api.github.com/repos/glyptodon/guacamole-client/statuses/0d92876d23126207c8fbe267342b29bcab93531d"}}}}