From 7f18d6cbf233c275e679e217316ced7d02ca463d Mon Sep 17 00:00:00 2001 From: Markus Schlotbohm Date: Fri, 30 Jul 2021 15:09:28 +0200 Subject: [PATCH 1/2] Contributes to #5680 --- src/Http/Authentication.Abstractions/src/AuthenticateResult.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Authentication.Abstractions/src/AuthenticateResult.cs b/src/Http/Authentication.Abstractions/src/AuthenticateResult.cs index 6b8b05f76d08..344c6d79d060 100644 --- a/src/Http/Authentication.Abstractions/src/AuthenticateResult.cs +++ b/src/Http/Authentication.Abstractions/src/AuthenticateResult.cs @@ -20,7 +20,7 @@ protected AuthenticateResult() { } /// /// If a ticket was produced, authenticate was successful. /// - [MemberNotNullWhen(true, nameof(Ticket))] + [MemberNotNullWhen(true, nameof(Ticket), nameof(Principal))] public bool Succeeded => Ticket != null; /// From 46ed0ecd6e2a3974423c3a6b4ad8475388eba35b Mon Sep 17 00:00:00 2001 From: Markus Schlotbohm Date: Fri, 30 Jul 2021 15:39:16 +0200 Subject: [PATCH 2/2] Same for the Properties property --- src/Http/Authentication.Abstractions/src/AuthenticateResult.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Authentication.Abstractions/src/AuthenticateResult.cs b/src/Http/Authentication.Abstractions/src/AuthenticateResult.cs index 344c6d79d060..e55e557309a3 100644 --- a/src/Http/Authentication.Abstractions/src/AuthenticateResult.cs +++ b/src/Http/Authentication.Abstractions/src/AuthenticateResult.cs @@ -20,7 +20,7 @@ protected AuthenticateResult() { } /// /// If a ticket was produced, authenticate was successful. /// - [MemberNotNullWhen(true, nameof(Ticket), nameof(Principal))] + [MemberNotNullWhen(true, nameof(Ticket), nameof(Principal), nameof(Properties))] public bool Succeeded => Ticket != null; ///