public void setSessionDefaultTimeout(DovetailDatabaseSettings dovetailDatabaseSettings)
        {
            var stateTimeoutTimespan = TimeSpan.FromMinutes(dovetailDatabaseSettings.SessionTimeoutInMinutes);

            _logger.LogDebug("Setting session time out to be {0} minutes long.", stateTimeoutTimespan);

            StateManager.StateTimeout = stateTimeoutTimespan;
        }
 public ClarifyApplicationFactory(DovetailDatabaseSettings dovetailDatabaseSettings,
                                  IEnumerable <IWorkflowObjectMetadata> metadatas,
                                  ILogger logger)
 {
     _dovetailDatabaseSettings = dovetailDatabaseSettings;
     _logger    = logger;
     _metadatas = metadatas;
 }
 public ClarifyApplicationFactory(DovetailDatabaseSettings dovetailDatabaseSettings, 
     IEnumerable<IWorkflowObjectMetadata> metadatas,
     ILogger logger)
 {
     _dovetailDatabaseSettings = dovetailDatabaseSettings;
     _logger = logger;
     _metadatas = metadatas;
 }
 public ClarifySessionCache(IClarifyApplication clarifyApplication, ILogger logger, IUserClarifySessionConfigurator sessionConfigurator, Func<IUserSessionEndObserver> sessionEndObserver, Func<IUserSessionStartObserver> sessionStartObserver, DovetailDatabaseSettings settings)
 {
     _clarifyApplication = clarifyApplication;
     _logger = logger;
     _sessionConfigurator = sessionConfigurator;
     _sessionEndObserver = sessionEndObserver;
     _sessionStartObserver = sessionStartObserver;
     _settings = settings;
 }
 public UserImpersonationService(IApplicationClarifySession applicationSession,
     IListCache listCache,
     DovetailDatabaseSettings settings,
     ILogger logger)
 {
     _applicationSession = applicationSession;
     _listCache = listCache;
     _settings = settings;
     _logger = logger;
 }
        public void BeforeAll()
        {
            _container = bootstrap_ioc.getContainer(c => { });
            _cut = _container.GetInstance<UserImpersonationService>();

            _settings = _container.GetInstance<DovetailDatabaseSettings>();
            _settings.IsImpersonationEnabled = true;

            beforeAll();
        }
        public CurrentSDKUser(DovetailDatabaseSettings settings, ILocaleCache localeCache, IUserDataAccess userDataAccess)
        {
            _settings = settings;
            _userDataAccess = userDataAccess;
            _localeCache = localeCache;

            //set up defaults
            SignOut();

            _user = new Lazy<SDKUser>(()=> _userDataAccess.GetUser(Username));
        }
 public ClarifySessionCache(IClarifyApplication clarifyApplication, ILogger logger,
                            IUserClarifySessionConfigurator sessionConfigurator, Func <IUserSessionEndObserver> sessionEndObserver,
                            Func <IUserSessionStartObserver> sessionStartObserver, DovetailDatabaseSettings settings)
 {
     _clarifyApplication   = clarifyApplication;
     _logger               = logger;
     _sessionConfigurator  = sessionConfigurator;
     _sessionEndObserver   = sessionEndObserver;
     _sessionStartObserver = sessionStartObserver;
     _settings             = settings;
 }
Example #9
0
        public CurrentSDKUser(DovetailDatabaseSettings settings, ILocaleCache localeCache, IUserDataAccess userDataAccess)
        {
            _settings       = settings;
            _userDataAccess = userDataAccess;
            _localeCache    = localeCache;

            //set up defaults
            SignOut();

            _user = new Lazy <SDKUser>(() => _userDataAccess.GetUser(Username));
        }
        public static NameValueCollection GetDovetailSDKConfiguration(DovetailDatabaseSettings dovetailDatabaseSettings)
        {
            var configuration = new NameValueCollection
            {
                { "fchoice.dbtype", dovetailDatabaseSettings.Type },
                { "fchoice.connectionstring", dovetailDatabaseSettings.ConnectionString },
                { "fchoice.disableloginfromfcapp", "false" },
                { "fchoice.sessionpasswordrequired", "false" },
                { "fchoice.nocachefile", "true" }
            };

            return(MergeSDKSettings(configuration, ConfigurationManager.AppSettings));
        }
        public CurrentSDKUser(DovetailDatabaseSettings settings, ILocaleCache localeCache, IUserDataAccess userDataAccess, ILogger logger)
        {
            _settings = settings;
            _userDataAccess = userDataAccess;
            _logger = logger;
            _localeCache = localeCache;

            //set up defaults
            SignOut();

            _user = new Lazy<SDKUser>(()=> _userDataAccess.GetUser(Username));
            _timezone = new Lazy<ITimeZone>(() => _user.Value.Timezone);
        }
        public static NameValueCollection GetDovetailSDKConfiguration(DovetailDatabaseSettings dovetailDatabaseSettings)
        {
            var configuration = new NameValueCollection
            {
                {"fchoice.dbtype", dovetailDatabaseSettings.Type},
                {"fchoice.connectionstring", dovetailDatabaseSettings.ConnectionString},
                {"fchoice.disableloginfromfcapp", "false"},
                {"fchoice.sessionpasswordrequired", "false"},
                {"fchoice.nocachefile", "true"}
            };

            return MergeSDKSettings(configuration, ConfigurationManager.AppSettings);
        }
Example #13
0
        public CurrentSDKUser(DovetailDatabaseSettings settings,
                              ILocaleCache localeCache,
                              IUserDataAccess userDataAccess,
                              IClarifySessionCache sessionCache,
                              ILogger logger)
        {
            _settings       = settings;
            _userDataAccess = userDataAccess;
            _sessionCache   = sessionCache;
            _logger         = logger;
            _localeCache    = localeCache;

            //set up defaults
            SignOut();
        }
        public CurrentSDKUser(DovetailDatabaseSettings settings, 
            ILocaleCache localeCache,
            IUserDataAccess userDataAccess,
            IClarifySessionCache sessionCache,
            ILogger logger)
        {
            _settings = settings;
            _userDataAccess = userDataAccess;
            _sessionCache = sessionCache;
            _logger = logger;
            _localeCache = localeCache;

            //set up defaults
            SignOut();
        }
 public CleanUpInvalidSessions(DovetailDatabaseSettings settings, IClarifySessionCache cache)
 {
     _settings = settings;
     _cache    = cache;
 }
Example #16
0
            public void beforeAll()
            {
                _userClarifySessionConfigurator = MockRepository.GenerateStub<IUserClarifySessionConfigurator>();
                _clarifyApplication = MockRepository.GenerateStub<IClarifyApplication>();

                _userSessionStartObserver = MockRepository.GenerateStub<IUserSessionStartObserver>();
                _userSessionEndObserver = MockRepository.GenerateStub<IUserSessionEndObserver>();

                _container = bootstrap_ioc.getContainer(c =>
                {
                    c.For<IUserClarifySessionConfigurator>().Use(_userClarifySessionConfigurator);
                    c.For<IClarifyApplication>().Use(_clarifyApplication);
                    c.For<IUserSessionStartObserver>().Use(_userSessionStartObserver);
                    c.For<IUserSessionEndObserver>().Use(_userSessionEndObserver);
                });

                _cut = _container.GetInstance<ClarifySessionCache>();

                _settings = _container.GetInstance<DovetailDatabaseSettings>();

                //have to create a REAL session because a test fake just won't do
                _expectedSession = CreateRealSession();
            }
 public ClarifyApplicationFactory(DovetailDatabaseSettings dovetailDatabaseSettings, ILogger logger)
 {
     _dovetailDatabaseSettings = dovetailDatabaseSettings;
     _logger = logger;
 }
Example #18
0
 public ClarifyApplicationFactory(DovetailDatabaseSettings dovetailDatabaseSettings)
 {
     _dovetailDatabaseSettings = dovetailDatabaseSettings;
 }
Example #19
0
 public static void setSessionDefaultTimeout(DovetailDatabaseSettings dovetailDatabaseSettings)
 {
     StateManager.StateTimeout = TimeSpan.FromMinutes(dovetailDatabaseSettings.SessionTimeoutInMinutes);
 }
 public NoAuthPrincipalValidator(DovetailDatabaseSettings settings)
 {
     _settings = settings;
 }
        public void setSessionDefaultTimeout(DovetailDatabaseSettings dovetailDatabaseSettings)
        {
            var stateTimeoutTimespan = TimeSpan.FromMinutes(dovetailDatabaseSettings.SessionTimeoutInMinutes);

            _logger.LogDebug("Setting session time out to be {0} minutes long.", stateTimeoutTimespan);

            StateManager.StateTimeout = stateTimeoutTimespan;
        }