Пример #1
0
        public userout login(DAl.userin user)
        {
            userout rs = new userout();

            rs.token = Userservis.login(user);
            return(rs);
        }
Пример #2
0
        public string login(DAl.userin user)
        {
            string token = null;
            us     id    = DAl.manager.login(user);

            if (id != null)
            {
                token = BlApp.Server.infrastructure.jwtUtility.generateToken(id, mainsetings);
            }
            return(token);
        }
Пример #3
0
        public static us login(userin user)
        {
            inc();
            us  use   = null;
            var users = Database.user.FirstOrDefault(x => x.email == user.email);

            if (users != null && user.password == users.password)
            {
                use = new us {
                    id = users.id, email = users.email, firstname = users.firstname, lastname = users.lastname
                }
            }
            ;
            return(use);
        }