Ejemplo n.º 1
0
 public TokenWrapper(AuthToken token)
 {
     UserId    = token.UserId;
     Email     = token.Email;
     FirstName = token.FirstName;
     LastName  = token.LastName;
     Image     = token.Image;
     Roles     = new List <Guid>();
     Roles.AddRange(token.Roles.Select(x => x.Id));
     Token = CryptoUtility.EncryptDES(JsonConvert.SerializeObject(token, new IsoDateTimeConverter()));
 }