{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Security/pulls/comments/121262758","pull_request_review_id":43302718,"id":121262758,"diff_hunk":"@@ -0,0 +1,89 @@\n+﻿// Copyright (c) .NET Foundation. All rights reserved.\n+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+using System;\n+using System.Security.Claims;\n+\n+namespace Microsoft.AspNetCore.Authentication\n+{\n+    /// <summary>\n+    /// Contains the result of an Authenticate call\n+    /// </summary>\n+    public class RemoteAuthenticationResult : AuthenticationResult\n+    {\n+        /// <summary>\n+        /// Indicates that stage of authentication was directly handled by user intervention and no\n+        /// further processing should be attempted.\n+        /// </summary>\n+        public bool HandledResponse { get; private set; }\n+\n+        /// <summary>\n+        /// Indicates that the default authentication logic should be\n+        /// skipped and that the rest of the pipeline should be invoked.\n+        /// </summary>\n+        public bool Skipped { get; private set; }\n+\n+        /// <summary>\n+        /// Indicates that authentication was successful.\n+        /// </summary>\n+        /// <param name=\"ticket\">The ticket representing the authentication result.</param>\n+        /// <returns>The result.</returns>\n+        public static new RemoteAuthenticationResult Success(AuthenticationTicket ticket)\n+        {\n+            if (ticket == null)\n+            {\n+                throw new ArgumentNullException(nameof(ticket));\n+            }\n+            return new RemoteAuthenticationResult() { Ticket = ticket };\n+        }\n+\n+        /// <summary>\n+        /// Indicates that there was a failure during authentication.\n+        /// </summary>\n+        /// <param name=\"failure\">The failure exception.</param>\n+        /// <returns>The result.</returns>\n+        public static new RemoteAuthenticationResult Fail(Exception failure)\n+        {\n+            return new RemoteAuthenticationResult() { Failure = failure };\n+        }\n+\n+        /// <summary>\n+        /// Indicates that there was a failure during authentication.\n+        /// </summary>\n+        /// <param name=\"failureMessage\">The failure message.</param>\n+        /// <returns>The result.</returns>\n+        public static new RemoteAuthenticationResult Fail(string failureMessage)\n+        {\n+            return new RemoteAuthenticationResult() { Failure = new Exception(failureMessage) };\n+        }\n+\n+        /// <summary>\n+        /// Indicates that there was no information returned for this authentication scheme.\n+        /// </summary>\n+        /// <returns>The result.</returns>\n+        public static new RemoteAuthenticationResult None()\n+        {\n+            return new RemoteAuthenticationResult() { Nothing = true };\n+        }\n+\n+        /// <summary>\n+        /// Indicates that stage of authentication was directly handled by user intervention and no\n+        /// further processing should be attempted.\n+        /// </summary>\n+        /// <returns>The result.</returns>\n+        public static RemoteAuthenticationResult HandleResponse()\n+        {\n+            return new RemoteAuthenticationResult() { HandledResponse = true };\n+        }\n+\n+        /// <summary>\n+        /// Indicates that the default authentication logic should be\n+        /// skipped and that the rest of the pipeline should be invoked.\n+        /// </summary>\n+        /// <returns>The result.</returns>\n+        public static RemoteAuthenticationResult SkipToNextMiddleware()","path":"src/Microsoft.AspNetCore.Authentication/RemoteAuthenticationResult.cs","position":84,"original_position":84,"commit_id":"98ed5c9e8c6aac2a1bb3fee49cc536497aba7720","original_commit_id":"49be57090ee0e7955c99e59b7f3aec65990d456c","user":{"login":"HaoK","id":6537861,"avatar_url":"https://avatars1.githubusercontent.com/u/6537861?v=3","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"body":"Are you referring to Skip in the context of a HandleRequestContext (SkipToNextMiddleware) vs a RemoteAuthenticate Skip which maps more to None?","created_at":"2017-06-10T17:57:56Z","updated_at":"2017-06-10T17:57:56Z","html_url":"https://github.com/aspnet/Security/pull/1243#discussion_r121262758","pull_request_url":"https://api.github.com/repos/aspnet/Security/pulls/1243","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Security/pulls/comments/121262758"},"html":{"href":"https://github.com/aspnet/Security/pull/1243#discussion_r121262758"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Security/pulls/1243"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Security/pulls/1243","id":123334715,"html_url":"https://github.com/aspnet/Security/pull/1243","diff_url":"https://github.com/aspnet/Security/pull/1243.diff","patch_url":"https://github.com/aspnet/Security/pull/1243.patch","issue_url":"https://api.github.com/repos/aspnet/Security/issues/1243","number":1243,"state":"open","locked":false,"title":"[Prototype] Revisit the events model","user":{"login":"PinpointTownes","id":6998306,"avatar_url":"https://avatars2.githubusercontent.com/u/6998306?v=3","gravatar_id":"","url":"https://api.github.com/users/PinpointTownes","html_url":"https://github.com/PinpointTownes","followers_url":"https://api.github.com/users/PinpointTownes/followers","following_url":"https://api.github.com/users/PinpointTownes/following{/other_user}","gists_url":"https://api.github.com/users/PinpointTownes/gists{/gist_id}","starred_url":"https://api.github.com/users/PinpointTownes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PinpointTownes/subscriptions","organizations_url":"https://api.github.com/users/PinpointTownes/orgs","repos_url":"https://api.github.com/users/PinpointTownes/repos","events_url":"https://api.github.com/users/PinpointTownes/events{/privacy}","received_events_url":"https://api.github.com/users/PinpointTownes/received_events","type":"User","site_admin":false},"body":"Things I've changed:\r\n\r\n  - `AuthenticateResult` was split into 2 classes: `AuthenticationResult` (living in the abstractions repo) and `RemoteAuthenticationResult` (living here).\r\n  - `AuthenticateResult.Handle()`/`Skip()` was moved to `RemoteAuthenticationResult`.\r\n  - The base context classes are now generic and expose the options + the scheme.\r\n  - The specialized OIDC/JWT/cookies base classes are gone thanks to the new generic classes.\r\n  - `HandleResponse()`/`SkipToNextMiddleware()` are no longer available from events that don't offer real flow control (basically all the events that are not called from `HandleRemoteAuthenticationAsync()`.\r\n  - Events that used to expose `HandleResponse()`/`SkipToNextMiddleware()` for something else that real flow control now have `CompleteAuthentication`/`SkipAuthentication`/`RejectAuthentication` (or the equivalent for challenge/signout.\r\n\r\nPlease note that it's a very early prototype :smile: \r\n\r\n/cc @HaoK @Tratcher ","created_at":"2017-05-31T18:10:55Z","updated_at":"2017-06-10T17:57:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9c90a215123c2e2ce1afe6685393eea4b6a5147","assignee":{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars0.githubusercontent.com/u/1821173?v=3","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},"assignees":[{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars0.githubusercontent.com/u/1821173?v=3","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},{"login":"HaoK","id":6537861,"avatar_url":"https://avatars1.githubusercontent.com/u/6537861?v=3","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Security/pulls/1243/commits","review_comments_url":"https://api.github.com/repos/aspnet/Security/pulls/1243/comments","review_comment_url":"https://api.github.com/repos/aspnet/Security/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Security/issues/1243/comments","statuses_url":"https://api.github.com/repos/aspnet/Security/statuses/98ed5c9e8c6aac2a1bb3fee49cc536497aba7720","head":{"label":"PinpointTownes:handler","ref":"handler","sha":"98ed5c9e8c6aac2a1bb3fee49cc536497aba7720","user":{"login":"PinpointTownes","id":6998306,"avatar_url":"https://avatars2.githubusercontent.com/u/6998306?v=3","gravatar_id":"","url":"https://api.github.com/users/PinpointTownes","html_url":"https://github.com/PinpointTownes","followers_url":"https://api.github.com/users/PinpointTownes/followers","following_url":"https://api.github.com/users/PinpointTownes/following{/other_user}","gists_url":"https://api.github.com/users/PinpointTownes/gists{/gist_id}","starred_url":"https://api.github.com/users/PinpointTownes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PinpointTownes/subscriptions","organizations_url":"https://api.github.com/users/PinpointTownes/orgs","repos_url":"https://api.github.com/users/PinpointTownes/repos","events_url":"https://api.github.com/users/PinpointTownes/events{/privacy}","received_events_url":"https://api.github.com/users/PinpointTownes/received_events","type":"User","site_admin":false},"repo":{"id":30196509,"name":"Security","full_name":"PinpointTownes/Security","owner":{"login":"PinpointTownes","id":6998306,"avatar_url":"https://avatars2.githubusercontent.com/u/6998306?v=3","gravatar_id":"","url":"https://api.github.com/users/PinpointTownes","html_url":"https://github.com/PinpointTownes","followers_url":"https://api.github.com/users/PinpointTownes/followers","following_url":"https://api.github.com/users/PinpointTownes/following{/other_user}","gists_url":"https://api.github.com/users/PinpointTownes/gists{/gist_id}","starred_url":"https://api.github.com/users/PinpointTownes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PinpointTownes/subscriptions","organizations_url":"https://api.github.com/users/PinpointTownes/orgs","repos_url":"https://api.github.com/users/PinpointTownes/repos","events_url":"https://api.github.com/users/PinpointTownes/events{/privacy}","received_events_url":"https://api.github.com/users/PinpointTownes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PinpointTownes/Security","description":"Middleware for security and authorization of web apps.","fork":true,"url":"https://api.github.com/repos/PinpointTownes/Security","forks_url":"https://api.github.com/repos/PinpointTownes/Security/forks","keys_url":"https://api.github.com/repos/PinpointTownes/Security/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PinpointTownes/Security/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PinpointTownes/Security/teams","hooks_url":"https://api.github.com/repos/PinpointTownes/Security/hooks","issue_events_url":"https://api.github.com/repos/PinpointTownes/Security/issues/events{/number}","events_url":"https://api.github.com/repos/PinpointTownes/Security/events","assignees_url":"https://api.github.com/repos/PinpointTownes/Security/assignees{/user}","branches_url":"https://api.github.com/repos/PinpointTownes/Security/branches{/branch}","tags_url":"https://api.github.com/repos/PinpointTownes/Security/tags","blobs_url":"https://api.github.com/repos/PinpointTownes/Security/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PinpointTownes/Security/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PinpointTownes/Security/git/refs{/sha}","trees_url":"https://api.github.com/repos/PinpointTownes/Security/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PinpointTownes/Security/statuses/{sha}","languages_url":"https://api.github.com/repos/PinpointTownes/Security/languages","stargazers_url":"https://api.github.com/repos/PinpointTownes/Security/stargazers","contributors_url":"https://api.github.com/repos/PinpointTownes/Security/contributors","subscribers_url":"https://api.github.com/repos/PinpointTownes/Security/subscribers","subscription_url":"https://api.github.com/repos/PinpointTownes/Security/subscription","commits_url":"https://api.github.com/repos/PinpointTownes/Security/commits{/sha}","git_commits_url":"https://api.github.com/repos/PinpointTownes/Security/git/commits{/sha}","comments_url":"https://api.github.com/repos/PinpointTownes/Security/comments{/number}","issue_comment_url":"https://api.github.com/repos/PinpointTownes/Security/issues/comments{/number}","contents_url":"https://api.github.com/repos/PinpointTownes/Security/contents/{+path}","compare_url":"https://api.github.com/repos/PinpointTownes/Security/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PinpointTownes/Security/merges","archive_url":"https://api.github.com/repos/PinpointTownes/Security/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PinpointTownes/Security/downloads","issues_url":"https://api.github.com/repos/PinpointTownes/Security/issues{/number}","pulls_url":"https://api.github.com/repos/PinpointTownes/Security/pulls{/number}","milestones_url":"https://api.github.com/repos/PinpointTownes/Security/milestones{/number}","notifications_url":"https://api.github.com/repos/PinpointTownes/Security/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PinpointTownes/Security/labels{/name}","releases_url":"https://api.github.com/repos/PinpointTownes/Security/releases{/id}","deployments_url":"https://api.github.com/repos/PinpointTownes/Security/deployments","created_at":"2015-02-02T16:36:08Z","updated_at":"2016-02-10T22:20:24Z","pushed_at":"2017-06-10T17:27:01Z","git_url":"git://github.com/PinpointTownes/Security.git","ssh_url":"git@github.com:PinpointTownes/Security.git","clone_url":"https://github.com/PinpointTownes/Security.git","svn_url":"https://github.com/PinpointTownes/Security","homepage":"","size":3278,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"f6bb49d1eae7ac294bb4de91b5f8c2d161db0d28","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars0.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":17723699,"name":"Security","full_name":"aspnet/Security","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars0.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Security","description":"Middleware for security and authorization of web apps.","fork":false,"url":"https://api.github.com/repos/aspnet/Security","forks_url":"https://api.github.com/repos/aspnet/Security/forks","keys_url":"https://api.github.com/repos/aspnet/Security/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Security/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Security/teams","hooks_url":"https://api.github.com/repos/aspnet/Security/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Security/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Security/events","assignees_url":"https://api.github.com/repos/aspnet/Security/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Security/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Security/tags","blobs_url":"https://api.github.com/repos/aspnet/Security/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Security/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Security/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Security/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Security/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Security/languages","stargazers_url":"https://api.github.com/repos/aspnet/Security/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Security/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Security/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Security/subscription","commits_url":"https://api.github.com/repos/aspnet/Security/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Security/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Security/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Security/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Security/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Security/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Security/merges","archive_url":"https://api.github.com/repos/aspnet/Security/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Security/downloads","issues_url":"https://api.github.com/repos/aspnet/Security/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Security/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Security/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Security/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Security/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Security/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Security/deployments","created_at":"2014-03-13T19:44:34Z","updated_at":"2017-06-10T07:03:00Z","pushed_at":"2017-06-10T17:27:03Z","git_url":"git://github.com/aspnet/Security.git","ssh_url":"git@github.com:aspnet/Security.git","clone_url":"https://github.com/aspnet/Security.git","svn_url":"https://github.com/aspnet/Security","homepage":"","size":4118,"stargazers_count":552,"watchers_count":552,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":289,"mirror_url":null,"open_issues_count":86,"forks":289,"open_issues":86,"watchers":552,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Security/pulls/1243"},"html":{"href":"https://github.com/aspnet/Security/pull/1243"},"issue":{"href":"https://api.github.com/repos/aspnet/Security/issues/1243"},"comments":{"href":"https://api.github.com/repos/aspnet/Security/issues/1243/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Security/pulls/1243/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Security/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Security/pulls/1243/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Security/statuses/98ed5c9e8c6aac2a1bb3fee49cc536497aba7720"}}}}
{"actor":{"display_login":"HaoK"}}