public OrgsByCategoryController(IOrganizationService organizationService, IWebSecurityService securityService, IEmailHelper emailHelper, IRegistrationService registrationService)
 {
     this.organizationService = organizationService;
     this.webSecurityService = securityService;
     this.emailHelper = emailHelper;
     this.registrationService = registrationService;
 }
 public AccountController(IWebSecurityService userService, IPersonService personService, IEmailHelper emailHelper, IAccountService accountService)
 {
     this.userService = userService;
     this.personService = personService;
     this.emailHelper = emailHelper;
     this.accountService = accountService;
 }
Exemple #3
0
 public AccountController(IWebSecurityService userService, IPersonService personService, IEmailHelper emailHelper, IAccountService accountService)
 {
     this.userService    = userService;
     this.personService  = personService;
     this.emailHelper    = emailHelper;
     this.accountService = accountService;
 }
Exemple #4
0
 public OrgsByCategoryController(IOrganizationService organizationService, IWebSecurityService securityService, IEmailHelper emailHelper, IRegistrationService registrationService)
 {
     this.organizationService = organizationService;
     this.webSecurityService  = securityService;
     this.emailHelper         = emailHelper;
     this.registrationService = registrationService;
 }
Exemple #5
0
 public LoginController(IWebSecurityService userService, IOrganizationService organizationService, IWorkflowInstanceService workflowInstanceService, IEmailHelper emailHelper)
 {
     this.userService             = userService;
     this.organizationService     = organizationService;
     this.workflowInstanceService = workflowInstanceService;
     this.emailHelper             = emailHelper;
 }
 public LoginController(IWebSecurityService userService, IOrganizationService organizationService, IWorkflowInstanceService workflowInstanceService, IEmailHelper emailHelper)
 {
     this.userService = userService;
     this.organizationService = organizationService;
     this.workflowInstanceService = workflowInstanceService;
     this.emailHelper = emailHelper;
 }
 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;
 }
Exemple #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;
 }
Exemple #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);
        }
Exemple #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;
 }
Exemple #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;
 }
 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);
 }
 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;
 }
Exemple #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);
        }
Exemple #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);
     }
 }
        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;
        }
Exemple #19
0
 public LogOffController(IWebSecurityService userService, IEmailHelper emailHelper)
 {
     this.userService = userService;
     this.emailHelper = emailHelper;
 }
Exemple #20
0
 public AccountService(IWebSecurityService webSecurityService, IPersonService personService, IEmailHelper emailHelper)
 {
     this.webSecurityService = webSecurityService;
     this.personService      = personService;
     this.emailHelper        = emailHelper;
 }
 public LocationController(IOrganizationService organizationService, IEmailHelper emailHelper, ISubscriptionService subscriptionService, IWebSecurityService securityService):base(subscriptionService, organizationService,securityService)
 {
     this.organizationService = organizationService;
     this.emailHelper = emailHelper;
 }
 public BaseApiController(ISubscriptionService subscriptionService, IOrganizationService organizationService, IWebSecurityService securityService)
 {
     this.subscriptionService = subscriptionService;
     this.organizationService = organizationService;
     this.webSecurityService = securityService;
 }
Exemple #23
0
 public AccountController( IWebSecurityService service)
 {
     this._service = service;
 }
 public AccountController(IWebSecurityService webSecurityService)
 {
     _webSecurityService = webSecurityService;
 }
Exemple #25
0
 public LocationController(IOrganizationService organizationService, IEmailHelper emailHelper, ISubscriptionService subscriptionService, IWebSecurityService securityService) : base(subscriptionService, organizationService, securityService)
 {
     this.organizationService = organizationService;
     this.emailHelper         = emailHelper;
 }
 public AccountController(IWebSecurityService webSecurityService, IUserService userService)
 {
     _webSecurityService = webSecurityService;
     _userService = userService;
 }
 public LogOffController(IWebSecurityService userService, IEmailHelper emailHelper)
 {
     this.userService = userService;
     this.emailHelper = emailHelper;
 }
 public AccountService(IWebSecurityService webSecurityService, IPersonService personService, IEmailHelper emailHelper)
 {
     this.webSecurityService = webSecurityService;
     this.personService = personService;
     this.emailHelper = emailHelper;
 }
Exemple #29
0
 public BaseApiController(ISubscriptionService subscriptionService, IOrganizationService organizationService, IWebSecurityService securityService)
 {
     this.subscriptionService = subscriptionService;
     this.organizationService = organizationService;
     this.webSecurityService  = securityService;
 }
Exemple #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);
        }
Exemple #31
0
 public OAuthController(IWebSecurityService userService)
 {
     this.userService = userService;
 }
 public UserProfileRepository(IWebSecurityService webSecurityService)
 {
     this.webSecurityService = webSecurityService;
 }
 public AccountController(IWebSecurityService webSecurityService, IUserService userService)
 {
     _webSecurityService = webSecurityService;
     _userService        = userService;
 }
Exemple #34
0
 public ContextFilter(IWebSecurityService webSecurity)
 {
     Ensure.ArgumentNotNull(webSecurity, "webSecurity");
     this.webSecurity = webSecurity;
 }
Exemple #35
0
 public AdditionalInformationController(IOrganizationService organizationService, IEmailHelper emailHelper, IWebSecurityService webSecurityService)
 {
     this.organizationService = organizationService;
     this.emailHelper         = emailHelper;
     this.webSecurityService  = webSecurityService;
 }
 public SetupWizardController(IDBVersionLogic dbVersionLogic, IWebSecurityService webSecurityService)
 {
     _dbVersionLogic = dbVersionLogic;
     _webSecurityService = webSecurityService;
 }
 public AccountController(IWebSecurityService webSecurityService, IUserLogic userLogic)
 {
     _webSecurityService = webSecurityService;
     _userLogic = userLogic;
 }
        protected override void Initialize(RequestContext requestContext)
        {
            if (WebSecurityService == null) { WebSecurityService = new WebSecurityService(); }

            base.Initialize(requestContext);
        }
 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;
 }
 public ContextFilter(IWebSecurityService webSecurity)
 {
     Ensure.ArgumentNotNull(webSecurity, "webSecurity");
     this.webSecurity = webSecurity;
 }
 public PasswordController(IWebSecurityService userService)
 {
     this.userService = userService;
 }
 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);
     }
 }
Exemple #45
0
 public AccountController(IWebSecurityService webSecurity, IMessengerService messengerService, ITournamentContext tournamentContext)
 {
     this.webSecurity       = webSecurity;
     this.messengerService  = messengerService;
     this.tournamentContext = tournamentContext;
 }