/// <summary>Runs the processor.</summary>
        /// <param name="args">The arguments.</param>
        public void Process(LogoutArgs args)
        {
            var redirectUrl = "http://www.google.com";

            args.RedirectUrl = new UrlString(redirectUrl);
            SheerResponse.Eval("window.top.location.href='" + redirectUrl + "'");
        }
        public void Process(LogoutArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            var authModule = FederatedAuthentication.WSFederationAuthenticationModule;
            WSFederationAuthenticationModule.FederatedSignOut(new Uri(authModule.Issuer), new Uri("https://uclasandbox.dustland.com"));
        }
Пример #3
0
            public async Task Logout_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
            {
                var args = new LogoutArgs();
                await args.ReadAsync(iprot, cancellationToken);

                await iprot.ReadMessageEndAsync(cancellationToken);

                var result = new LogoutResult();

                try
                {
                    result.Success = await _iAsync.LogoutAsync(args.Request, cancellationToken);

                    await oprot.WriteMessageBeginAsync(new TMessage("Logout", TMessageType.Reply, seqid), cancellationToken);

                    await result.WriteAsync(oprot, cancellationToken);
                }
                catch (TTransportException)
                {
                    throw;
                }
                catch (Exception ex)
                {
                    Console.Error.WriteLine("Error occurred in processor:");
                    Console.Error.WriteLine(ex.ToString());
                    var x = new TApplicationException(TApplicationException.ExceptionType.InternalError, " Internal error.");
                    await oprot.WriteMessageBeginAsync(new TMessage("Logout", TMessageType.Exception, seqid), cancellationToken);

                    await x.WriteAsync(oprot, cancellationToken);
                }
                await oprot.WriteMessageEndAsync(cancellationToken);

                await oprot.Transport.FlushAsync(cancellationToken);
            }
Пример #4
0
        public void Process(LogoutArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            var authModule = FederatedAuthentication.WSFederationAuthenticationModule;

            WSFederationAuthenticationModule.FederatedSignOut(new Uri(authModule.Issuer), new Uri("https://uclasandbox.dustland.com"));
        }
Пример #5
0
        public void Process(LogoutArgs args)
        {
            var data = new SubscriptionEventArgs()
            {
                Username = Sitecore.Context.User.Name
            };

            Sitecore.Events.Event.RaiseEvent("westcosocket:unsubscribe", data);
        }
        internal void ChannelLogout(object sender, LogoutArgs e)
        {
            var userRedisModel = new UserRedisModel()
            {
                UserName = e.UserName,
                UserId   = e.UserId,
                FullName = e.FullName
            };

            SignOut(userRedisModel);
        }
Пример #7
0
        public void Process(LogoutArgs args)
        {
            Tracer.Info("Intercepting call to Sitecore logout. Redirecting to Single Logout instead");
            Sitecore.Text.UrlString urlString = new Sitecore.Text.UrlString("https://www.google.com");
            args.RedirectUrl = urlString;

            //var uri = "https://www.google.com";
            //var psi = new System.Diagnostics.ProcessStartInfo();
            //psi.UseShellExecute = true;
            //psi.FileName = uri;
            //System.Diagnostics.Process.Start(psi);
        }
        public void Process(LogoutArgs args)
        {
            string currentUserName = Context.User.Profile.UserName;
            var    database        = Sitecore.Configuration.Factory.GetDatabase("master");

            Item[] items = database.SelectItems("fast:/sitecore/content//*[@__lock='%" + currentUserName + "%']");
            foreach (var item in items)
            {
                item.Editing.BeginEdit();
                item.Locking.Unlock();
                item.Editing.EndEdit();

                Sitecore.Diagnostics.Log.Info("Item unlocked: " + item.Paths.FullPath + " by user (" + currentUserName + ") logout", this);
            }
        }
Пример #9
0
        public void Process(LogoutArgs args)
        {
            if (args == null) return;
            var publications = _service.GetApplicablePublications(new Guid(Constants.PocessorEventIds.UserLogOut));
            if (!publications.Any())
                return;

            foreach (var publication in publications)
            {
                foreach (var channel in publication.GetChannels())
                {
                    _message.Text = $"User was logged out";
                    _message.UpdateChannelInfo(channel, publication);
                    _service.PublishMessage(_message);
                }
            }
        }
Пример #10
0
        public void Process(LogoutArgs args)
        {
            if (args == null)
            {
                return;
            }
            var publications = _service.GetApplicablePublications(new Guid(Constants.PocessorEventIds.UserLogOut));

            if (!publications.Any())
            {
                return;
            }

            foreach (var publication in publications)
            {
                foreach (var channel in publication.GetChannels())
                {
                    _message.Text = $"User was logged out";
                    _message.UpdateChannelInfo(channel, publication);
                    _service.PublishMessage(_message);
                }
            }
        }
Пример #11
0
            public async Task <LogoutResponse> LogoutAsync(LogoutRequest request, CancellationToken cancellationToken = default(CancellationToken))
            {
                await OutputProtocol.WriteMessageBeginAsync(new TMessage("Logout", TMessageType.Call, SeqId), cancellationToken);

                var args = new LogoutArgs();

                args.Request = request;

                await args.WriteAsync(OutputProtocol, cancellationToken);

                await OutputProtocol.WriteMessageEndAsync(cancellationToken);

                await OutputProtocol.Transport.FlushAsync(cancellationToken);

                var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken);

                if (msg.Type == TMessageType.Exception)
                {
                    var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);

                    await InputProtocol.ReadMessageEndAsync(cancellationToken);

                    throw x;
                }

                var result = new LogoutResult();
                await result.ReadAsync(InputProtocol, cancellationToken);

                await InputProtocol.ReadMessageEndAsync(cancellationToken);

                if (result.__isset.success)
                {
                    return(result.Success);
                }
                throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Logout failed: unknown result");
            }
 public void Process(LogoutArgs args)
 {
     Event.RaiseEvent("security:loggedOut", new object[] { });
 }
Пример #13
0
 public virtual void Process(LogoutArgs args)
 {
     Assert.ArgumentNotNull(args, "args");
     UnlockMyItemsIfAny();
 }