Comments (6)
No, in general. Payload transparency is a mode where the whole args/kwargs is not a structured object, but itself just a binary value opaque to the router. Hence the name "payload transparency".
JSON binary supports allow you to eg do a call with
args = ["foo", 23, b'\xc0\xfc\xde\x84']
or
kwargs = {"foo": 23, "bar": b'\xc0\xfc\xde\x84'}
Hence the JSON serializer/deserializer must be able to traverse/process binary values deep inside structured app payload.
In AutobahnPython, this is implemented by overriding the "string item processing" hook on the standard JSON serializer/deserializer:
In general, this requires that the JSON serializer/deserializer has hooks to do such things ... or it requires a full custom one
from connectanum-dart.
Do you mean that in conjunction with wamp-proto/wamp-proto#228 ? Or in general?
from connectanum-dart.
I'll implement it in general, just saw that I forgot about transparent payload as well 🤯
from connectanum-dart.
Yes I Did it that way 😊
from connectanum-dart.
I already pushed and released it
from connectanum-dart.
^ ok, I tested it: seems to work!
with JSON (sever side), notice 'protocol': 'wamp.2.json'
:
network | 2021-03-21T00:02:29+0000 [Router 106] Authenticator.authenticate(realm="xbrnetwork", authid="None", details={'transport': {'type': 'websocket', 'protocol': 'wamp.2.json', 'peer': 'tcp4:213.170.219.39:27618', 'http_headers_received': {'user-agent': 'Dart/2.13 (dart:io)', 'connection': 'Upgrade', 'cache-control': 'no-cache', 'accept-encoding': 'gzip', 'content-length': '0', 'sec-websocket-version': '13', 'host': 'thingcloud-box-aws.sthngs.crossbario.com:8090', 'sec-websocket-extensions': 'permessage-deflate; client_max_window_bits', 'sec-websocket-key': 'lWDsHf0VFQy7IHyQIs3Mxg==', 'sec-websocket-protocol': 'wamp.2.json', 'upgrade': 'websocket'}, 'http_headers_sent': {}, 'websocket_extensions_in_use': [{'extension': 'permessage-deflate', 'is_server': True, 'server_no_context_takeover': False, 'client_no_context_takeover': False, 'server_max_window_bits': 13, 'client_max_window_bits': 13, 'mem_level': 5}], 'cbtid': None, 'channel_id': '0000000000000000000000000000000000000000000000000000000000000000'}, 'session': 8036318037757571, 'authmethod': 'cryptosign', 'authextra': {'pubkey': 'f878b6f07db66bdcc64ed6f5c8d7251100355d95da2210ab14c3f7c6f589aeb2', 'channel_binding': None}, 'authid': None, 'authrole': None})
network | 2021-03-21T00:02:29+0000 [Router 106] Authenticator.authenticate(..) => {'pubkey': 'f878b6f07db66bdcc64ed6f5c8d7251100355d95da2210ab14c3f7c6f589aeb2', 'realm': 'xbrnetwork', 'authid': 'member-93538308-8a43-43c5-a411-ae3b4bdd5bd7', 'role': 'member', 'extra': None, 'cache': True}
network | 2021-03-21T00:02:29+0000 [Router 106] attached session 8036318037757571 to realm "xbrnetwork" (authid="member-93538308-8a43-43c5-a411-ae3b4bdd5bd7", authrole="member") <crossbar.router.router.Router.attach>
with MsgPack, 'protocol': 'wamp.2.msgpack'
:
network | 2021-03-21T00:03:13+0000 [Router 106] Authenticator.authenticate(realm="xbrnetwork", authid="None", details={'transport': {'type': 'websocket', 'protocol': 'wamp.2.msgpack', 'peer': 'tcp4:213.170.219.39:27710', 'http_headers_received': {'user-agent': 'Dart/2.13 (dart:io)', 'connection': 'Upgrade', 'cache-control': 'no-cache', 'accept-encoding': 'gzip', 'content-length': '0', 'sec-websocket-version': '13', 'host': 'thingcloud-box-aws.sthngs.crossbario.com:8090', 'sec-websocket-extensions': 'permessage-deflate; client_max_window_bits', 'sec-websocket-key': 'h/94NSyeCc691z4vJ8wRPQ==', 'sec-websocket-protocol': 'wamp.2.msgpack', 'upgrade': 'websocket'}, 'http_headers_sent': {}, 'websocket_extensions_in_use': [{'extension': 'permessage-deflate', 'is_server': True, 'server_no_context_takeover': False, 'client_no_context_takeover': False, 'server_max_window_bits': 13, 'client_max_window_bits': 13, 'mem_level': 5}], 'cbtid': None, 'channel_id': '0000000000000000000000000000000000000000000000000000000000000000'}, 'session': 925287054320347, 'authmethod': 'cryptosign', 'authextra': {'pubkey': 'f878b6f07db66bdcc64ed6f5c8d7251100355d95da2210ab14c3f7c6f589aeb2', 'channel_binding': None}, 'authid': None, 'authrole': None})
network | 2021-03-21T00:03:13+0000 [Router 106] Authenticator.authenticate(..) => {'pubkey': 'f878b6f07db66bdcc64ed6f5c8d7251100355d95da2210ab14c3f7c6f589aeb2', 'realm': 'xbrnetwork', 'authid': 'member-93538308-8a43-43c5-a411-ae3b4bdd5bd7', 'role': 'member', 'extra': None, 'cache': True}
network | 2021-03-21T00:03:13+0000 [Router 106] attached session 925287054320347 to realm "xbrnetwork" (authid="member-93538308-8a43-43c5-a411-ae3b4bdd5bd7", authrole="member") <crossbar.router.router.Router.attach>
from connectanum-dart.
Related Issues (20)
- Add way more logging!
- Resubscribe to Topics on Reconnection HOT 2
- Was there dublicate sessions fix from version 1.0.6 to 1.1.6 HOT 1
- WAMPCRA: Only derive key when `salt` present in Challenge HOT 11
- Session call arguments type HOT 2
- session.publish seem to stuck HOT 4
- Session.publish with PublishOptions(acknowledge: false) waits for `PUBLISHED`
- Strange behaviour of Session.publish and/or Session.subscribe HOT 2
- Session.call seem to block HOT 3
- Cache stored key for scram authentication
- Support multiple serializers HOT 18
- Implement CBOR serializer HOT 15
- Better reconnection handling HOT 1
- Implement Payload PassThru Mode HOT 4
- Flaute WebApp Chrome Webhost is not supporting dart.html HOT 9
- Auth failure response doesn't seem right HOT 19
- not connect websocket HOT 2
- Currently the connection doesn't support authextra HOT 2
- Unable to catch error HOT 7
- Support dart2wasm compilation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from connectanum-dart.