示例#1
0
        public AuthModule(UserRepository userRepository, IMailingService mailingService, IResourcesTemplateService resourcesTemplateService)
        {
            _userRepository = userRepository;
            _mailingService = mailingService;
            _resourcesTemplateService = resourcesTemplateService;
            Get["/Auth/Login"] = x => View["Login"];
            Post["/Auth/Login"] = Login;

            Get["/Auth/Register"] = x => View["Login", new { IsRegister = true}];
            Post["/Auth/Register"] = Register;

            Get["/Auth/RecoverPassword"] = RecoverPassword;
            Get["/Auth/AskPassword"] = AskPassword;
            Post["/Auth/ChangePassword"] = ChangePassword;
        }
示例#2
0
 public UserMapper(UserRepository repository)
 {
     _repository = repository;
 }