File: session.fbs

package info (click to toggle)
python-autobahn 22.7.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,404 kB
  • sloc: python: 38,356; javascript: 2,705; makefile: 905; ansic: 371; sh: 63
file content (158 lines) | stat: -rw-r--r-- 4,577 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158

//////////////////////////////////////////////////////////////////////////////
//
//   FlatBuffers schema for WAMP v2 messages
//   Copyright (c) Crossbar.io Technologies GmbH and contributors
//   Licensed under the MIT License (MIT)
//
//////////////////////////////////////////////////////////////////////////////

include "types.fbs";
include "roles.fbs";
include "auth.fbs";

namespace wamp.proto;


// HELLO message (message_type = 1): [HELLO, Realm|uri, Details|dict]
table Hello
{
    // The WAMP session roles and client library features to announce.
    roles: ClientRoles (required);

    // The URI of the WAMP realm the client wants to join.
    realm: string (uri);

    // The authentication methods to announce.
    authmethods: [AuthMethod];

    // The (client) authentication ID to announce.
    authid: string (principal);

    // The (client) authentication role to announce.
    authrole: string (principal);

    // authmethod specific extra data to be forwarded to the client.
    authextra: Map;

    // Whether the client wants this to be a session that can be
    // later resumed (HELLO.Details.resumable).
    resumable: bool;

    // The session the client would like to resume (HELLO.Details.resume_session).
    resume_session: uint64;

    // The secure authorisation token to resume the session (HELLO.Details.resume_token).
    resume_token: string;
}


// WELCOME message (message_type = 2): [WELCOME, Session|id, Details|dict]
table Welcome
{
    // The WAMP roles to announce.
    roles: RouterRoles (required);

    // The WAMP session ID the other peer is assigned.
    session: uint64;

    // The effective realm the session is joined on.
    realm: string (required, uri);

    // The authentication ID assigned.
    authid: string (required, principal);

    // The authentication method in use.
    authrole: string (required, principal);

    // The authentication method in use.
    authmethod: AuthMethod;

    // The authentication provided in use.
    authprovider: string;

    // Application-specific "extra data" to be forwarded to the client.
    authextra: Map;

    // Whether the session is a resumed one.
    resumed: bool;

    // Whether this session can be resumed later.
    resumable: bool;

    // The secure authorisation token to resume the session.
    resume_token: string;
}


// ABORT message (message_type = 3): [ABORT, Details|dict, Reason|uri]
table Abort
{
    // WAMP or application error URI for aborting reason.
    reason: string (required, uri);

    // Optional human-readable closing message, e.g. for logging purposes.
    message: string;
}


// CHALLENGE message (message_type = 4): [CHALLENGE, Method|string, Extra|dict]
table Challenge
{
    // The challenge method.
    method: AuthMethod;

    // Challenge method specific information.
    extra: Map;
}


// AUTHENTICATE message (message_type = 5): [AUTHENTICATE, Signature|string, Extra|dict]
table Authenticate
{
    // The signature for the authentication challenge.
    signature: string (required);

    // Authentication method specific information.
    extra: Map;
}


// GOODBYE message (message_type = 6): [GOODBYE, Details|dict, Reason|uri]
table Goodbye
{
    // Optional WAMP or application error URI for closing reason.
    reason: string (required, uri);

    // Optional human-readable closing message, e.g. for logging purposes.
    message: string;

    // From the server: Whether the session is able to be resumed (true) or destroyed (false). From the client: Whether it should be resumable (true) or destroyed (false).
    resumable: bool;
}


// ERROR message (message_type = 8): [ERROR, REQUEST.Type|int, REQUEST.Request|id, Details|dict, Error|uri, Payload|binary]
table Error
{
    // The WAMP message type code for the original request.
    request_type: MessageType;

    // The WAMP request ID of the original request (CALL, SUBSCRIBE, ...) this error occurred for.
    request: uint64 (key);

    // The WAMP or application error URI for the error that occurred.
    error: string (required, uri);

    // Raw application payload: error arguments. This might be encrypted (with Payload==Payload.CRYPTOBOX), and is serialized according to enc_serializer.
    payload: [uint8];

    // The encoding algorithm that was used to encode the payload.
    enc_algo: Payload;

    // The payload object serializer that was used encoding the payload.
    enc_serializer: Serializer;

    // When using Payload.CRYPTOBOX, the public Cryptobox key of the key pair used for encrypting the payload.
    enc_key: [uint8];
}