/// <summary> /// Creates a <see cref="ClaimsPrincipal"/> instance from the information contained in the current <see cref="UserInformation"/> instance. /// </summary> /// <remarks>Since the UserInformation does not expose a username property, the "Name" claim will not be added to the returned <see cref="IClaimsPrincipal"/> instance.</remarks> /// <returns>A new <see cref="IClaimsPrincipal"/> instance.</returns> public IClaimsPrincipal ToClaimsPrincipal() { var identity = new ClaimsIdentity("UserInformation-Generated-Principal"); AddBasicUserClaims(identity); //Create State level Claims AddStateAgencyClaims(identity); // Create Local Education Agency claims AddLocalEducationAgencyClaims(identity); // Create School claims AddSchoolClaims(identity); // Return the claims principal return new ClaimsPrincipal(identity.ToEnumerable()); }