public OrgsByCategoryController(IOrganizationService organizationService, IWebSecurityService securityService, IEmailHelper emailHelper, IRegistrationService registrationService)
 {
     this.organizationService = organizationService;
     this.webSecurityService = securityService;
     this.emailHelper = emailHelper;
     this.registrationService = registrationService;
 }
예제 #2
0
 public AccountController(IWebSecurityService userService, IPersonService personService, IEmailHelper emailHelper, IAccountService accountService)
 {
     this.userService = userService;
     this.personService = personService;
     this.emailHelper = emailHelper;
     this.accountService = accountService;
 }
예제 #3
0
 public AccountController(IWebSecurityService userService, IPersonService personService, IEmailHelper emailHelper, IAccountService accountService)
 {
     this.userService    = userService;
     this.personService  = personService;
     this.emailHelper    = emailHelper;
     this.accountService = accountService;
 }
예제 #4
0
 public OrgsByCategoryController(IOrganizationService organizationService, IWebSecurityService securityService, IEmailHelper emailHelper, IRegistrationService registrationService)
 {
     this.organizationService = organizationService;
     this.webSecurityService  = securityService;
     this.emailHelper         = emailHelper;
     this.registrationService = registrationService;
 }
예제 #5
0
 public LoginController(IWebSecurityService userService, IOrganizationService organizationService, IWorkflowInstanceService workflowInstanceService, IEmailHelper emailHelper)
 {
     this.userService             = userService;
     this.organizationService     = organizationService;
     this.workflowInstanceService = workflowInstanceService;
     this.emailHelper             = emailHelper;
 }
예제 #6
0
 public LoginController(IWebSecurityService userService, IOrganizationService organizationService, IWorkflowInstanceService workflowInstanceService, IEmailHelper emailHelper)
 {
     this.userService = userService;
     this.organizationService = organizationService;
     this.workflowInstanceService = workflowInstanceService;
     this.emailHelper = emailHelper;
 }
예제 #7
0
 public CustomerController(ISubscriptionService subscriptionService, IOrganizationService organizationService, IWebSecurityService securityService, IEmailHelper emailHelper)
     : base(subscriptionService, organizationService, securityService)
 {
     this.subscriptionService = subscriptionService;
     this.organizationService = organizationService;
     this.webSecurityService = securityService;
     this.emailHelper = emailHelper;
 }
예제 #8
0
 public InvoiceController(ISubscriptionService subscriptionService, IOrganizationService organizationService, IWebSecurityService securityService, IEmailHelper emailHelper)
     : base(subscriptionService, organizationService, securityService)
 {
     this.subscriptionService = subscriptionService;
     this.organizationService = organizationService;
     this.webSecurityService  = securityService;
     this.emailHelper         = emailHelper;
 }
예제 #9
0
        protected override void Initialize(RequestContext requestContext)
        {
            if (db == null) { db = new ESKAPEDEContext(); }
            if (WebSecurityService == null) { WebSecurityService = new WebSecurityService(); }
            if (MessengerService == null) { MessengerService = new MessengerService(); }

            base.Initialize(requestContext);
        }
예제 #10
0
 public OrganizationController(IOrganizationService organizationService, IWebSecurityService securityService, IEmailHelper emailHelper, IRegistrationService registrationService, IWorkflowInstanceService workflowInstanceService, IWorkflowService workflowService)
 {
     this.organizationService     = organizationService;
     this.webSecurityService      = securityService;
     this.emailHelper             = emailHelper;
     this.registrationService     = registrationService;
     this.workflowInstanceService = workflowInstanceService;
     this.workflowService         = workflowService;
 }
        protected override void Initialize(RequestContext requestContext)
        {
            if (MembershipService == null)
            {
                MembershipService = new WebSecurityService();
            }

            base.Initialize(requestContext);
        }
 public OrganizationController(IOrganizationService organizationService, IWebSecurityService securityService, IEmailHelper emailHelper, IRegistrationService registrationService, IWorkflowInstanceService workflowInstanceService, IWorkflowService workflowService)
 {
     this.organizationService = organizationService;
     this.webSecurityService = securityService;
     this.emailHelper = emailHelper;
     this.registrationService = registrationService;
     this.workflowInstanceService = workflowInstanceService;
     this.workflowService = workflowService;
 }
예제 #13
0
 public OrganizationService(IUnitOfWork unitOfWork, IOrganizationRepository organizationRepository, IPersonService personService, IWebSecurityService userService, IEmailHelper emailHelper, ILocationRepository locationRepository, ISubscriptionService subscriptionService, ICategoryService categoryService)
 {
     this.unitOfWork             = unitOfWork;
     this.organizationRepository = organizationRepository;
     this.personService          = personService;
     this.userService            = userService;
     this.emailHelper            = emailHelper;
     this.locationRepository     = locationRepository;
     this.subscriptionService    = subscriptionService;
     this.categoryService        = categoryService;
 }
예제 #14
0
 public AccountController(IWebSecurityService webSecurityService, IPersonService personService, IAccountService accountService, IEmailHelper emailHelper, IWorkflowInstanceService workflowInstanceService, IWorkflowService workflowService)
 {
     this.webSecurityService = webSecurityService;
     this.personService = personService;
     this.accountService = accountService;
     this.emailHelper = emailHelper;
     this.workflowInstanceService = workflowInstanceService;
     this.workflowService = workflowService;
     
     Boolean.TryParse(ConfigurationManager.AppSettings["RequireSignUpVerification"], out requireVerification);
 }
예제 #15
0
 public OrganizationService(IUnitOfWork unitOfWork, IOrganizationRepository organizationRepository, IPersonService personService, IWebSecurityService userService, IEmailHelper emailHelper, ILocationRepository locationRepository, ISubscriptionService subscriptionService, ICategoryService categoryService)
 {
     this.unitOfWork = unitOfWork;
     this.organizationRepository = organizationRepository;
     this.personService = personService;
     this.userService = userService;
     this.emailHelper = emailHelper;
     this.locationRepository = locationRepository;
     this.subscriptionService = subscriptionService;
     this.categoryService = categoryService;
 }
예제 #16
0
        public AccountController(IWebSecurityService webSecurityService, IPersonService personService, IAccountService accountService, IEmailHelper emailHelper, IWorkflowInstanceService workflowInstanceService, IWorkflowService workflowService)
        {
            this.webSecurityService      = webSecurityService;
            this.personService           = personService;
            this.accountService          = accountService;
            this.emailHelper             = emailHelper;
            this.workflowInstanceService = workflowInstanceService;
            this.workflowService         = workflowService;

            Boolean.TryParse(ConfigurationManager.AppSettings["RequireSignUpVerification"], out requireVerification);
        }
예제 #17
0
 private static void SeedMembershipData(IWebSecurityService webSecurity)
 {
     if (!Roles.RoleExists(Constants.AdministratorsRoleName))
     {
         Roles.CreateRole(Constants.AdministratorsRoleName);
     }
     if (!webSecurity.UserExists("Admin"))
     {
         // TODO: Make sure password reset functionality works.
         webSecurity.CreateUserAndAccount("Admin", "admin", new { Email = "*****@*****.**" });
         Roles.AddUserToRole("Admin", Constants.AdministratorsRoleName);
     }
 }
예제 #18
0
        protected override bool AuthorizeCore(HttpContextBase httpContext)
        {
            _webSecurityService = ObjectFactory.GetInstance<IWebSecurityService>();
            _userLogic = ObjectFactory.GetInstance<IUserLogic>();

            // if the user is already authenticated let them in fast
            if (_webSecurityService.IsAuthenticated)
            {
                var roleAuthorized = false;
                foreach (var role in Regex.Split(Roles, @"\s*,\s*"))
                {
                    roleAuthorized = httpContext.User.IsInRole(role);
                }
                if (!roleAuthorized)
                    return false;

                return true;
            }

            // if we're not authenticated and there's a guid check if it matches a user
            var guid = Guid.Empty;
            if (!string.IsNullOrWhiteSpace(httpContext.Request.QueryString.Get("guid")))
                guid = Guid.Parse(httpContext.Request.QueryString.Get("guid"));
            if (!_webSecurityService.IsAuthenticated && guid != Guid.Empty)
            {
                var user = _userLogic.Get(guid, null);

                // if a user has a matching guid let them in
                if (user != null)
                {
                    FormsAuthentication.SetAuthCookie(user.Email, false);
                    _aController.CurrentUser = user;
                    // have to set the current principal as well as the cookie or we won't have it until refresh
                    var identity = new GenericIdentity(user.Email, "Forms");
                    httpContext.User = new GenericPrincipal(identity, new string[] { });
                    Thread.CurrentPrincipal = new GenericPrincipal(identity, new string[] { });

                    return true;
                }
            }

            return false;
        }
예제 #19
0
 public LogOffController(IWebSecurityService userService, IEmailHelper emailHelper)
 {
     this.userService = userService;
     this.emailHelper = emailHelper;
 }
예제 #20
0
 public AccountService(IWebSecurityService webSecurityService, IPersonService personService, IEmailHelper emailHelper)
 {
     this.webSecurityService = webSecurityService;
     this.personService      = personService;
     this.emailHelper        = emailHelper;
 }
예제 #21
0
 public LocationController(IOrganizationService organizationService, IEmailHelper emailHelper, ISubscriptionService subscriptionService, IWebSecurityService securityService):base(subscriptionService, organizationService,securityService)
 {
     this.organizationService = organizationService;
     this.emailHelper = emailHelper;
 }
예제 #22
0
 public BaseApiController(ISubscriptionService subscriptionService, IOrganizationService organizationService, IWebSecurityService securityService)
 {
     this.subscriptionService = subscriptionService;
     this.organizationService = organizationService;
     this.webSecurityService = securityService;
 }
예제 #23
0
 public AccountController( IWebSecurityService service)
 {
     this._service = service;
 }
예제 #24
0
 public AccountController(IWebSecurityService webSecurityService)
 {
     _webSecurityService = webSecurityService;
 }
예제 #25
0
 public LocationController(IOrganizationService organizationService, IEmailHelper emailHelper, ISubscriptionService subscriptionService, IWebSecurityService securityService) : base(subscriptionService, organizationService, securityService)
 {
     this.organizationService = organizationService;
     this.emailHelper         = emailHelper;
 }
예제 #26
0
 public AccountController(IWebSecurityService webSecurityService, IUserService userService)
 {
     _webSecurityService = webSecurityService;
     _userService = userService;
 }
예제 #27
0
 public LogOffController(IWebSecurityService userService, IEmailHelper emailHelper)
 {
     this.userService = userService;
     this.emailHelper = emailHelper;
 }
예제 #28
0
 public AccountService(IWebSecurityService webSecurityService, IPersonService personService, IEmailHelper emailHelper)
 {
     this.webSecurityService = webSecurityService;
     this.personService = personService;
     this.emailHelper = emailHelper;
 }
예제 #29
0
 public BaseApiController(ISubscriptionService subscriptionService, IOrganizationService organizationService, IWebSecurityService securityService)
 {
     this.subscriptionService = subscriptionService;
     this.organizationService = organizationService;
     this.webSecurityService  = securityService;
 }
예제 #30
0
        protected override void Initialize(RequestContext requestContext)
        {
            if (db == null) { db = new ESKAPEDEContext(); }
            if (WebSecurityService == null) { WebSecurityService = new WebSecurityService(); }
            if (MessengerService == null) { MessengerService = new MessengerService(); }
            if (ServiceSkpd == null) { ServiceSkpd = new ServiceSkpd(); }
            if (WebSecurityService.HasUserId) WebSecurityService.Logout();

            base.Initialize(requestContext);
        }
예제 #31
0
 public OAuthController(IWebSecurityService userService)
 {
     this.userService = userService;
 }
예제 #32
0
 public UserProfileRepository(IWebSecurityService webSecurityService)
 {
     this.webSecurityService = webSecurityService;
 }
예제 #33
0
 public AccountController(IWebSecurityService webSecurityService, IUserService userService)
 {
     _webSecurityService = webSecurityService;
     _userService        = userService;
 }
예제 #34
0
 public ContextFilter(IWebSecurityService webSecurity)
 {
     Ensure.ArgumentNotNull(webSecurity, "webSecurity");
     this.webSecurity = webSecurity;
 }
예제 #35
0
 public AdditionalInformationController(IOrganizationService organizationService, IEmailHelper emailHelper, IWebSecurityService webSecurityService)
 {
     this.organizationService = organizationService;
     this.emailHelper         = emailHelper;
     this.webSecurityService  = webSecurityService;
 }
예제 #36
0
 public SetupWizardController(IDBVersionLogic dbVersionLogic, IWebSecurityService webSecurityService)
 {
     _dbVersionLogic = dbVersionLogic;
     _webSecurityService = webSecurityService;
 }
예제 #37
0
 public AccountController(IWebSecurityService webSecurityService, IUserLogic userLogic)
 {
     _webSecurityService = webSecurityService;
     _userLogic = userLogic;
 }
예제 #38
0
        protected override void Initialize(RequestContext requestContext)
        {
            if (WebSecurityService == null) { WebSecurityService = new WebSecurityService(); }

            base.Initialize(requestContext);
        }
예제 #39
0
 public AccountController(IWebSecurityService webSecurity, IMessengerService messengerService, ITournamentContext tournamentContext)
 {
     this.webSecurity = webSecurity;
     this.messengerService = messengerService;
     this.tournamentContext = tournamentContext;
 }
 public AdditionalInformationController(IOrganizationService organizationService, IEmailHelper emailHelper, IWebSecurityService webSecurityService)
 {
     this.organizationService = organizationService;
     this.emailHelper = emailHelper;
     this.webSecurityService = webSecurityService;
 }
예제 #41
0
 public ContextFilter(IWebSecurityService webSecurity)
 {
     Ensure.ArgumentNotNull(webSecurity, "webSecurity");
     this.webSecurity = webSecurity;
 }
예제 #42
0
 public PasswordController(IWebSecurityService userService)
 {
     this.userService = userService;
 }
예제 #43
0
 public UsersController(IUserLogic userLogic, IWebSecurityService webSecurityService)
 {
     _userLogic = userLogic;
     _webSecurityService = webSecurityService;
 }
 private static void SeedMembershipData(IWebSecurityService webSecurity)
 {
     if (!Roles.RoleExists(Constants.AdministratorsRoleName))
     {
         Roles.CreateRole(Constants.AdministratorsRoleName);
     }
     if (!webSecurity.UserExists("Admin"))
     {
         // TODO: Make sure password reset functionality works.
         webSecurity.CreateUserAndAccount("Admin", GenerateRandomPassword(), new { Email = "*****@*****.**" });
         Roles.AddUserToRole("Admin", Constants.AdministratorsRoleName);
     }
 }
예제 #45
0
 public AccountController(IWebSecurityService webSecurity, IMessengerService messengerService, ITournamentContext tournamentContext)
 {
     this.webSecurity       = webSecurity;
     this.messengerService  = messengerService;
     this.tournamentContext = tournamentContext;
 }