Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit 81c06fa

Browse files
committed
Make middleware report when auth fails.
1 parent 779de7a commit 81c06fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Microsoft.AspNet.Security/Infrastructure/AuthenticationHandler.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ public virtual void Authenticate(IAuthenticateContext context)
141141
{
142142
context.Authenticated(ticket.Identity, ticket.Properties.Dictionary, BaseOptions.Description.Dictionary);
143143
}
144+
else
145+
{
146+
context.NotAuthenticated(BaseOptions.AuthenticationType, properties: null, description: BaseOptions.Description.Dictionary);
147+
}
144148
}
145149

146150
if (PriorHandler != null)

0 commit comments

Comments
 (0)