Esempio n. 1
0
        public NucleoIdentity(WindowsIdentity identity)
        {
            Dictionary <string, object> claims = new Dictionary <string, object>();

            claims.Add(ClaimKeys.UserName, identity.Name);

            if (identity.IsAuthenticated)
            {
                claims.Add(ClaimKeys.AuthenticationStatus, AuthenticationStatus.OK);
            }
            else
            {
                claims.Add(ClaimKeys.AuthenticationStatus, AuthenticationStatus.NotEspecified);
            }

            Claims = new ClaimDictionary(claims);
        }
Esempio n. 2
0
 /// <summary>
 /// Constructor interno de la clase
 /// </summary>
 /// <param name="claimDictionary">Claims del usuario</param>
 internal NucleoIdentity(ClaimDictionary claimDictionary)
 {
     Claims = claimDictionary;
 }