Exemplo n.º 1
0
        public void Try_GetBoutiqueGuestUserMenu()
        {
            WulkaSession.Current = SessionFactory.CreateDefaultWulkaSession();
            var res = GetUserEnvironmentInfo();

            Console.WriteLine(res);
        }
 public void Try_LoginGuest()
 {
     WulkaSession.Current     = SessionFactory.CreateDefaultWulkaSession();
     WulkaCredentials.Current = WulkaSession.Current.Credentials;
     var sess = AuthenticationPortal
                .Authentication
                .TerminateSession();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Removes the session.
 /// </summary>
 /// <param name="session">The session.</param>
 /// <returns>WulkaSession.</returns>
 internal WulkaSession RemoveSession(WulkaSession session)
 {
     if (session == null)
     {
         session = SessionFactory.CreateDefaultWulkaSession();
     }
     PrintSession(session, "Removing");
     lock (ActiveSessions)
     {
         ActiveSessions.Remove(session.Id);
     }
     PrintSession(session, "Removed");
     return(SessionFactory.CreateDefaultWulkaSession());
 }
Exemplo n.º 4
0
 private void StartUp()
 {
     EnableExceptionHandling();
     ApplyTheme(LauncherConfigurationHelper.DefaultTheme);
     DXSplashScreen.Show <HubSplashWindow>();
     CheckSingleInstance();
     //AppDomain.CurrentDomain.AssemblyLoad += (s1, e1) => SetSplashFeedback(String.Format("Loading : {0}",
     //    e1.LoadedAssembly.
     //        FullName));
     PreloadAssemblies();
     Thread.Sleep(5000);
     WulkaSession.Current = SessionFactory.CreateDefaultWulkaSession();
     DoEvents();
 }
Exemplo n.º 5
0
 /// <summary>
 /// Adds the session.
 /// </summary>
 /// <param name="session">The nfo.</param>
 /// <returns>WulkaSession.</returns>
 internal WulkaSession AddSession(WulkaSession session)
 {
     if (session == null)
     {
         session = SessionFactory.CreateDefaultWulkaSession();
     }
     session.SessionId = Guid.Empty.ToString();
     PrintSession(session, "Adding");
     lock (ActiveSessions)
     {
         session = Decorate(session);
         RemoveSession(session);
         ActiveSessions.Add(session.Id, session);
     }
     PrintSession(session, "Added");
     return(session);
 }
Exemplo n.º 6
0
        /// <summary>
        /// Authenticates the user credentials.
        /// </summary>
        /// <returns>WulkaSession.</returns>
        public WulkaSession AuthenticateUserCredentials()
        {
            if (Identity == null)
            {
                _logger.Error("Identity is null! Check infrastructure!");
                return(SessionFactory.CreateDefaultWulkaSession());
            }
            _logger.Info("Authenticating user {0}", Identity.Name);
            if (!Identity.IsAuthenticated)
            {
                return(SessionFactory.CreateDefaultWulkaSession());
            }
            WulkaSession sess = null;

            using (var spc = new TransactionScope())
            {
                sess = CreateValidWulkaSession(Identity.Name, (Identity is WindowsIdentity) ? AuthenticationMode.Windows : AuthenticationMode.Native);
                GetAccountForSession(sess);
                spc.Complete();
            }
            return(sess);
        }
Exemplo n.º 7
0
 /// <summary>
 /// Authenticates the user credentials.
 /// </summary>
 /// <param name="identity">The identity.</param>
 /// <returns>WulkaSession.</returns>
 public WulkaSession AuthenticateUserCredentials(IIdentity identity)
 {
     return(identity.IsAuthenticated
         ? CreateValidWulkaSession(identity.Name, identity.AuthenticationType)
         : SessionFactory.CreateDefaultWulkaSession());
 }
Exemplo n.º 8
0
        public void Try_StartSession()
        {
            var inp = SessionFactory.CreateDefaultWulkaSession();

            StartSession(inp);
        }
Exemplo n.º 9
0
 /// <summary>
 /// Logons the guest.
 /// </summary>
 private void LogonGuest()
 {
     WulkaSession.Current     = SessionFactory.CreateDefaultWulkaSession();
     WulkaCredentials.Current = WulkaSession.Current.Credentials;
     AuthenticationHost.TerminateSessionAsync(GetUserEnvironmentInfo);
 }