public DTO.Result <Clue.Common.DTO.SecurityToken> GetToken(string user, string pass) { var dbUser = Session.Users.Find(p => p.UserName == user && p.Password == pass).SingleOrDefault(); if (dbUser == null) { return(new DTO.Result <SecurityToken>("El usuario/contraseña no son correctos")); } var token = SecurityToken.Generate(dbUser.Id.Value, DateTime.UtcNow.AddMonths(6)); return(new DTO.Result <SecurityToken>(token)); }