PROPERTY

ClaimsIdentity.IsAuthenticated

For ClaimsIdentity, reports whether AuthenticationType is nonempty. This property alone does not validate any credentials; production principals must be established by trusted authentication handlers.

Formal Syntax & Structure

csharp syntaxcsharp
bool authenticated = identity.IsAuthenticated;

Working Example

Example Snippetcsharp
using System;using System.Security.Claims;using System.Linq;var identity = new ClaimsIdentity();Console.WriteLine(identity.IsAuthenticated); // False
C# & .NET Reference