示例#1
0
        public Operation SessionSignOut()
        => Operation.Try(async() =>
        {
            var sessionId = (await _sessionContext
                             .CurrentSessionId())
                            .ThrowIf(default(Guid), new GaiaException(ErrorCodes.DomainLogicError));

            var userId = (await _userContext
                          .CurrentUserId())
                         .ThrowIf(default(Guid), new GaiaException(ErrorCodes.DomainLogicError));

            await _logonInvalidator.InvalidateLogon(userId, sessionId);
        });