Example #1
0
    protected new void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        authService = (IAuthService)ctx.GetObject("AuthService");
        wudadaMailService = new WuDADAMailService();

    }
Example #2
0
        public AuthModule(ITokenizer tokenizer, IAuthService authService)
            : base("auth")
        {
            this.tokenizer = tokenizer;
            this.authService = authService;

            Post["/token"] = x =>
            {
                var request = this.CustomBindAndValidate<AuthenticateUserRequest>();
                var identity = GetUserIdentity(request);
                var response = GetAuthenticateResponse(identity);

                return Negotiate
                    .WithStatusCode(HttpStatusCode.OK)
                    .WithModel(response);
            };

            Post["/register"] = x =>
            {
                var request = this.CustomBindAndValidate<RegisterUserRequest>();

                authService.Register(request);

                var response = new RegisterUserResponse();

                return Negotiate
                    .WithStatusCode(HttpStatusCode.OK)
                    .WithModel(response);
            };
        }
Example #3
0
   public AccountController(
 IUserRoleCrudService userRoleService,
 IAuthService authService)
   {
       _userRoleService = userRoleService;
         _authService = authService;
   }
        public override void OnAuthorization(AuthorizationContext filterContext)
        {
            string controller = filterContext.RouteData.Values["controller"].ToString();
            string action = filterContext.RouteData.Values["action"].ToString();
            HttpCookieCollection cookies = filterContext.HttpContext.Request.Cookies;

            authService = ServiceBuilder.BuildAuthService();
            ResponseStatus status = authService.IsAllow(controller, action, cookies);
            switch(status)
            {
                case ResponseStatus.ALLOW_ALL_USER:
                    break;
                case ResponseStatus.ALLOW_NONE_USER:
                    break;
                case ResponseStatus.ALLOW_SPECIFY_USER_PASS:
                    break;
                case ResponseStatus.NOALLOW:
                    filterContext.Result = new RedirectToRouteResult(
                        "message",
                        new RouteValueDictionary() {
                            {"msg","PermissionDenied"}
                        });
                    break;
                case ResponseStatus.NOT_LOGIN:
                    filterContext.Result = new RedirectToRouteResult("Login", null);
                    break;
                case ResponseStatus.NONE:
                    break;
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     m_AuthFactory = new AuthFactory();
     m_AuthService = m_AuthFactory.GetAuthService();
     m_MemberFactory = new MemberFactory();
     m_MemberService = m_MemberFactory.GetMemberService();
 }
Example #6
0
 public static IAuthService BuildAuthService()
 {
     if (auth_Service == null)
     {
         auth_Service = new AuthService();
     }
     return auth_Service;
 }
Example #7
0
        public AuthViewModel(IAuthService authService, ILeftMenuService leftMenuService)
        {
            Contract.Requires(authService != null);
            Contract.Requires(leftMenuService != null);

            this.leftMenuService = leftMenuService;
            this.authService = authService;
        }
 public WorkCenterBeforeController(
     IWorkCenterService workCenterService,
     IAuthService authService
     )
 {
     this.workCenterService = workCenterService;
     this.authService = authService;
 }
Example #9
0
        public LoginViewModel(IAuthService authService, INavigationService navigationService, ISignalRClient signalRClient)
        {
            this.authService = authService;
            this.navigationService = navigationService;
            this.signalRClient = signalRClient;

            LoginCommand = new DelegateCommand(DoLogin);
        }
Example #10
0
 //
 // GET: /Word/
 public WordController(IAuthService authService, IWordRepository wordRepository, IAccountRepository accountRepository, ILanguageInfosRepository languageInfosRepository, IDictionaryRepository dictionaryRepository, ITranslationRepository translationRepository)
 {
     _authService = authService;
     _wordRepository = wordRepository;
     _accountRepository = accountRepository;
     _dictionaryRepository = dictionaryRepository;
     _translationRepository = translationRepository;
     _languageInfosRepository = languageInfosRepository;
 }
Example #11
0
    protected new void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        authService = (IAuthService)ctx.GetObject("AuthService");

        if (!Page.IsPostBack)
        {    
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        IApplicationContext ctx = ContextRegistry.GetContext();
        authService = (IAuthService)ctx.GetObject("AuthService");

        if (!Page.IsPostBack)
        {
            InitData();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        m_AuthFactory = new AuthFactory();
        m_AuthService = m_AuthFactory.GetAuthService();

        if (!Page.IsPostBack)
        {
           // setPrgName();
        }
    }
Example #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     IApplicationContext ctx = ContextRegistry.GetContext();
     authService = (IAuthService)ctx.GetObject("AuthService");
     string userId = Request.QueryString["UserId"];
     if (!Page.IsPostBack)
     {
         SerControl();
         initData(userId);
     }
 }
Example #15
0
        public ShellViewModel(IAuthStore authStore, IAuthService authService, ISignalRClient signalRClient,
            Func<LoginViewModel> loginFactory, Func<LoggedInViewModel> loggedInFactory)
        {
            this.authStore = authStore;
            this.authService = authService;
            this.signalRClient = signalRClient;
            this.loginFactory = loginFactory;
            this.loggedInFactory = loggedInFactory;

            Refresh();
        }
Example #16
0
    protected new void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        authService = (IAuthService)ctx.GetObject("AuthService");

        txtID.Focus();
        if (!IsPostBack)
        {
            CheckLoginCookies();
            setDirectAdminLogin();
        }
    }
Example #17
0
 public WorkCenterServiceTest(
     IWorkCenterRepository workCenterRepository,
     IWorkCenterJobRepository jobRepo,
     IConfigurationRepository configRepo,
     IAuthService authService
     )
 {
     this.workCenterRepository = workCenterRepository;
     this.jobRepo = jobRepo;
     this.configRepo = configRepo;
     this.authService = authService;
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        m_SystemFactory = new SystemFactory();
        m_AuthFactory = new AuthFactory();
        m_LogService = m_SystemFactory.GetLogService();
        m_AuthSevice = m_AuthFactory.GetAuthService();

        if (!Page.IsPostBack)
        {
            InitData();
            fillGridView();
        }
    }
 public CustomerManager(
     string userName,
     DataContext db,
     IAuthService authService,
     IMailer mailer,
     ICustomerLogManager customerLogManager)
     : base(userName)
 {
     _db = db;
     _authService = authService;
     _mailer = mailer;
     _customerLogManager = customerLogManager;
 }
Example #20
0
        public AuthModule(IAuthService authService)
            : base("auth")
        {
            this.authService = authService;

            Post["/register"] = x =>
            {
                var request = this.Bind<RegisterUserRequest>();

                authService.Register(request);

                return Negotiate.WithStatusCode(HttpStatusCode.OK);
            };
        }
Example #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        IApplicationContext ctx = ContextRegistry.GetContext();
        authService = (IAuthService)ctx.GetObject("AuthService");

        if (!IsPostBack)
        {
            initGV();
          
        }

        //新增模式
        ToInsertMode();
    }
Example #22
0
 public LoginPresenter(
     ILoginView view,
     IErrorView errorView,
     IDatabaseService databaseService,
     IAuthService authService,
     ISettingsService settingsService,
     IBackgroundTaskFactory backgroundTaskFactory)
 {
     _view = view;
     _errorView = errorView;
     _databaseService = databaseService;
     _authService = authService;
     _settingsService = settingsService;
     _backgroundTaskFactory = backgroundTaskFactory;
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        m_AuthFactory = new AuthFactory();
        m_AuthService = m_AuthFactory.GetAuthService();

        if (!Page.IsPostBack)
        {
            initMenu();

            new TreeViewState().RestoreTreeView(tvMenu, this.GetType().ToString());

            //初始選單下方左邊資料
            initLeftData();

        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        m_AuthFactory = new AuthFactory();
        m_AuthService = m_AuthFactory.GetAuthService();
        m_MemberFactory = new MemberFactory();
        m_MemberService = m_MemberFactory.GetMemberService();
        m_PostFactory = new PostFactory();
        m_PostService = m_PostFactory.GetPostService();

        if (!IsPostBack)
        {
            IList<NodeVO> storeList = m_PostService.GetNodeListByParentName("店家");
            ltlTitle.Text = string.Format("<title> 品讚行動通訊聯合系統-{0}</title>", storeList[0].Name);
            ltlTitle2.Text = string.Format("<品讚行動通訊聯合系統-{0}", storeList[0].Name);
        }
    }
Example #25
0
    protected new void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        authService = (IAuthService)ctx.GetObject("AuthService");

        if (!IsPostBack)
        {
            HttpHelper httpHelper = new HttpHelper();
            string ip = httpHelper.GetUserIp(HttpContext.Current);

            if ("127.0.0.1".Equals(ip))
            {
                hdnIsOK.Value = "Y";
            }
        }

        setInitPanel();
    }
Example #26
0
 public AccountController(ISsoSetting ssoSetting, IAuthenticationService svcAuthentication, IAuthService svcAuth,
     IAuthorizationCodeManager authorizationCodeManager, 
     IClientVerifier clientVerifier,
     ITranslation translation,
     IAccountRegisterManager accountRegisterManager,
     IClientManager clientManager,
     IValidateCodeBuilder validateCodeBuilder,
     IAuthorizationCodeHolder authorizationCodeHolder)
 {
     _svcAuthentication = svcAuthentication;
     _svcAuth = svcAuth;
     _authorizationCodeManager = authorizationCodeManager;
     _clientVerifier = clientVerifier;
     _translation = translation;
     _accountRegisterManager = accountRegisterManager;
     _clientManager = clientManager;
     _validateCodeBuilder = validateCodeBuilder;
     _authorizationCodeHolder = authorizationCodeHolder;
     _ssoSetting = ssoSetting;
     Logger =NullLogger.Instance;
 }
Example #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        IApplicationContext ctx = ContextRegistry.GetContext();
        authService = (IAuthService)ctx.GetObject("AuthService");
        

        if (!Page.IsPostBack)
        {
            ClearData();

            if (Request.QueryString["id"] != null)
            {
                UseUpdateMode();
                LoadDataToUI(int.Parse(Request.QueryString["id"].ToString()));
            }
            else
            {
                UseAddMode();
            }
        }
    }
        public WuDADAMailService()
        {
            IApplicationContext ctx = ContextRegistry.GetContext();
            myService = (MyService)ctx.GetObject("MyService");
            authService = (IAuthService)ctx.GetObject("AuthService");

            systemParamVO = myService.Dao.DaoGetVOById<SystemParamVO>(VarHelper.WuDADA_SYSTEMPARAM_ID);

            bool enableSSL = systemParamVO.IsEnableSSL;
            int port = 25;

            if (systemParamVO.MailSmtp.IndexOf("gmail") != -1)
            {
                enableSSL = true;
                port = 587;
            }
            else if (!string.IsNullOrEmpty(systemParamVO.MailPort))
            {
                port = int.Parse(systemParamVO.MailPort);
            }
            mailService = new MailService(systemParamVO.MailSmtp, port, enableSSL, systemParamVO.Account, systemParamVO.Password);
        }
 public AccountController(IAuthService authService, ISession session)
 {
     this.authService = authService;
     this.session = session;
 }
 private void Awake()
 {
     m_authService = new AppGalleryService();
 }
Example #31
0
 public BaseController(IAuthService authService)
 {
     _authService = authService;
 }
Example #32
0
 protected AccountController(IAuthTokenService tokenService, IUserService <TAuthUser> accountService, IClientService clientService, IAuthService <TAuthUser> auth)
     : base(tokenService, accountService, clientService, auth)
 {
     _userService   = accountService;
     _clientService = clientService;
 }
Example #33
0
        public AccountController(IAccountManager accountManager, IMapper mapper, IEmailSender emailSender,
                                 IConfiguration configuration, IFilesUploader filesUploader, IDatabase database, IAuthService authService)
        {
            this.accountManager = accountManager;
            this.mapper         = mapper;
            this.emailSender    = emailSender;
            this.filesUploader  = filesUploader;
            this.database       = database;
            this.authService    = authService;
            this.Configuration  = configuration;

            this.filesUploader.PreparePathAndUrl("users");
        }
 public FormService()
 {
     db          = new DynamicFormsContext();
     authService = new AuthService();
 }
Example #35
0
 public RegistrationController(IAuthService authService, IProfileService profileService, ICaptchaService captchaService)
 {
     _authService    = authService;
     _profileService = profileService;
     _captchaService = captchaService;
 }
Example #36
0
 public SearchContributionViewModel(IAnalyticsService analyticsService, IAuthService authService,
     IDialogService dialogService, INavigationHelper navigationHelper)
     : base(analyticsService, authService, dialogService, navigationHelper)
 {
 }
Example #37
0
 public TimeEntryService(IAuthService authService, IApiClient apiClient, IProjectService projectService)
 {
     _authService    = authService;
     _apiClient      = apiClient;
     _projectService = projectService;
 }
 public YourDetailsController(ILogger <YourDetailsController> logger, IOptions <CompositeSettings> compositeSettings, IDssReader dssService, IAuthService authService, IDocumentService <CmsApiSharedContentModel> documentService, IConfiguration config)
     : base(compositeSettings, authService, documentService, config)
 {
     _dssService = dssService;
 }
Example #39
0
 /// <summary>
 /// Konstruktor kontrolera
 /// </summary>
 public SifarnikController(ISifarnikService sifarnikService, ILogService logService, IAuthService authService)
 {
     this.sifarnikService = sifarnikService;
     this.logService      = logService;
     this.authService     = authService;
 }
Example #40
0
 public HomeController(IAuthService authService, IMediator mediator)
 {
     this.authService = authService;
     this.mediator = mediator;
 }
Example #41
0
 public NetworkService(string serverPath)
 {
     _serverPath  = serverPath;
     _authService = Locator.Current.GetService <IAuthService>();
 }
 public AddGameObjectModel(IAuthService authService, IMetaTagService imts, IDataService ds) : base(authService, imts, ds)
 {
 }
 public AuthController(IAuthService authService, ISmsService twilioSmsService, OnlineShopContext shopContext)
 {
     this.authService      = authService;
     this.twilioSmsService = twilioSmsService;
     this.shopContext      = shopContext;
 }
Example #44
0
 public ProductsService(HttpClient httpClient, IAuthService authService, AppSettings settings)
     : base(httpClient, authService, settings)
 {
 }
Example #45
0
        // Kullanici adi, parola ve Originator kullanilarak bir sms paketi olusturulur.



        public PersonService(JwtDbContext dbContext, IAuthService authService, IAppUserService appUserService)
        {
            _dbContext      = dbContext;
            _authService    = authService;
            _appUserService = appUserService;
        }
Example #46
0
 public AuthController(IAuthService authService, ITokenService tokenService)
 {
     _authService  = authService;
     _tokenService = tokenService;
 }
Example #47
0
 public EmployeeController(IAuthTokenService tokenService, IEmployeeService employeeService, IClientService clientService, IAuthService <Employee> auth)
     : base(tokenService, employeeService, clientService, auth)
 {
     _employeeService = employeeService;
     _clientService   = clientService;
 }
Example #48
0
 public UserRepository(RepositoryContext repositoryContext, IAuthService authService)
 {
     _repoContext = repositoryContext;
     _authService = authService;
 }
Example #49
0
 public CustomerController(IAuthTokenService tokenService, ICustomerService customerService, IClientService clientService, IAuthService <Customer> auth)
     : base(tokenService, customerService, clientService, auth)
 {
     _customerService = customerService;
     _clientService   = clientService;
 }
Example #50
0
 public AuthController(IAuthService authService, IConfiguration config)
 {
     _config      = config;
     _authService = authService;
 }
Example #51
0
 public TokenRefresher(byte[] key, IAuthService authService, IUnitOfWork uow)
 {
     _key         = key;
     _authService = authService;
     Database     = uow;
 }
 public BookingsController(IHotelService hotelService, IAuthService authService)
 {
     _hotelService = hotelService;
     _authService  = authService;
 }
Example #53
0
 public BalancesTotalController(IBalancesTotalService balancesTotalService, IAuthService authService) : base(authService)
 {
     _balancesTotalService = balancesTotalService;
 }
 public AuthController(ILogger <AuthController> logger, IAuthService service)
 {
     _logger  = logger;
     _service = service;
 }
Example #55
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserService"/> class.
 /// </summary>
 /// <param name="userRepository">Repository containing users.</param>
 public UserService(IUserRepository userRepository, IAuthService authService)
 {
     _userRepository = userRepository;
     _authService    = authService;
 }
Example #56
0
 public AuthController(IAuthService auth)
 {
     _auth = auth;
 }
Example #57
0
 public AuthController(IAuthService IAuth) => _IAuth = IAuth;
Example #58
0
 public UsersController(IUserRepository userRepository, IAuthService authService, IMapper mapper)
 {
     _userRepository = userRepository;
     _authService    = authService;
     _mapper         = mapper;
 }
 public AuthController(IAuthService authService)
 {
     _authService = authService;
 }
Example #60
0
 public ChangePasswordController(IAuthService authService)
 {
     _authService = authService;
 }