public FubuContinuation Get(LogoffRequest request) { _authenticationContext.SignOut(); return(FubuContinuation.RedirectTo(new LoginRequest() { ReturnUrl = "/" })); }
public static LogoffResponse LogUserOff(LogoffRequest request) { // Unregister user from the container: if (AsyncListener.ConnectedClientIds.Contains(request.UserId) == true) { AsyncListener.ConnectedClientIds.Remove(request.UserId); } // Add server ID: LogoffResponse logoffResponse = new LogoffResponse(); logoffResponse.UserId = "0"; return(logoffResponse); }
/// <summary> /// Close socket and exit program. /// </summary> public void Logoff() { LogoffRequest logoff = new LogoffRequest() { UserId = MessengerService.ClientId }; this.SendRequest(logoff.SerializeToJson(), this.ClientSocket); string jsonLogoffResponse = this.ReceiveResponse(this.ClientSocket); MessengerService.ClientId = null; ClientSocket.Shutdown(SocketShutdown.Both); ClientSocket.Close(); Environment.Exit(0); }
public NTStatus Logoff() { if (!m_isConnected) { throw new InvalidOperationException("A login session must be successfully established before attempting logoff"); } LogoffRequest request = new LogoffRequest(); ulong messageId = TrySendCommand(request); SMB2Command response = WaitForCommand(SMB2CommandName.Logoff, messageId); if (response != null) { m_isLoggedIn = (response.Header.Status != NTStatus.STATUS_SUCCESS); return(response.Header.Status); } return(NTStatus.STATUS_INVALID_SMB); }
public async Task <NTStatus> LogoffAsync(CancellationToken cancellationToken) { if (!m_isConnected) { throw new InvalidOperationException("A login session must be successfully established before attempting logoff"); } LogoffRequest request = new LogoffRequest(); await TrySendCommandAsync(request, cancellationToken); SMB2Command response = WaitForCommand(SMB2CommandName.Logoff); if (response != null) { m_isLoggedIn = (response.Header.Status != NTStatus.STATUS_SUCCESS); return(response.Header.Status); } return(NTStatus.STATUS_INVALID_SMB); }
public System.Threading.Tasks.Task <LogoffResponse> LogoffAsync(LogoffRequest request) { return(base.Channel.LogoffAsync(request)); }
public FubuContinuation Get(LogoffRequest request) { _authenticationContext.SignOut(); return FubuContinuation.RedirectTo(new LoginRequest() {ReturnUrl = "/"}); }