<PackageReference Include="System.Security.Permissions" Version="9.0.6" />

PrincipalPermissionAttribute

Allows security actions for PrincipalPermission to be applied to code using declarative security. This class cannot be inherited.
public bool Authenticated { get; set; }

Gets or sets a value indicating whether the current principal has been authenticated by the underlying role-based security provider.

public string Name { get; set; }

Gets or sets the name of the identity associated with the current principal.

public string Role { get; set; }

Gets or sets membership in a specified security role.

Initializes a new instance of the PrincipalPermissionAttribute class with the specified SecurityAction.