mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-11-30 07:06:50 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1357c7043f | ||
|
|
b6f3eb1a93 | ||
|
|
1adab829fe | ||
|
|
e3edc45480 | ||
|
|
f293d6c952 | ||
|
|
c2e521329b | ||
|
|
9d75ba49c3 | ||
|
|
a0077947f4 | ||
|
|
069632510a | ||
|
|
816519febb | ||
|
|
c3c3da65eb | ||
|
|
f542352851 | ||
|
|
bf048d196e | ||
|
|
c1a1fdaa98 | ||
|
|
14b256671b | ||
|
|
7c8719b22d | ||
|
|
434beb2120 | ||
|
|
2e4c7405b2 | ||
|
|
a0d04a44a8 | ||
|
|
df4dba5ee9 | ||
|
|
a0fdf6ee78 | ||
|
|
8e1387e419 | ||
|
|
0837da8781 | ||
|
|
49c1ed5d92 | ||
|
|
d709167465 | ||
|
|
168b202dbf | ||
|
|
4f8d89145a | ||
|
|
a99a71f436 | ||
|
|
c30450bd57 | ||
|
|
db913b95cc | ||
|
|
f648ed8311 | ||
|
|
05018238b2 | ||
|
|
fa164dfc1d | ||
|
|
5206d07f54 | ||
|
|
d4d3a99d76 | ||
|
|
0946871ecc | ||
|
|
facdd79b4c | ||
|
|
e138ba98c4 | ||
|
|
e608d1a8e1 | ||
|
|
f12648c67f | ||
|
|
c8c086cabb | ||
|
|
9bba301565 | ||
|
|
bad6a13fd1 | ||
|
|
3af21eab02 | ||
|
|
62086d1ed2 | ||
|
|
4f836d3910 | ||
|
|
1a1c39d4c0 | ||
|
|
afd2564ea4 | ||
|
|
20d09491c9 | ||
|
|
a98a7b4981 | ||
|
|
24a9d54a58 | ||
|
|
0c6383d0e2 | ||
|
|
cd8479e67a | ||
|
|
99a66dc51b | ||
|
|
1ced66e001 | ||
|
|
af4397d00e | ||
|
|
87cd46d42f | ||
|
|
05e38de854 | ||
|
|
4d57da79ac | ||
|
|
8309273cdb | ||
|
|
394467b694 | ||
|
|
251fa186dc | ||
|
|
45fab90a00 | ||
|
|
5d2ff7fd3b | ||
|
|
f7b0357563 | ||
|
|
75dabfcd86 | ||
|
|
fa0efcaebb | ||
|
|
7c2d482afe | ||
|
|
624e45ec8f | ||
|
|
8d0a494bee | ||
|
|
cb0dae7ae1 | ||
|
|
53c520c1ef | ||
|
|
662ceda87b | ||
|
|
cbe51139f9 | ||
|
|
252666b020 | ||
|
|
2d78b484a4 | ||
|
|
1155ad62ba | ||
|
|
8239f0ec89 | ||
|
|
89036535c7 | ||
|
|
aadf492a17 | ||
|
|
49ac4472c4 | ||
|
|
6fa4d87ec2 | ||
|
|
229d1bd89c | ||
|
|
6bde704cc1 | ||
|
|
ddc0649111 | ||
|
|
de80d7a3c1 | ||
|
|
19ca8bf94d | ||
|
|
c4008500da | ||
|
|
b6b543d09b | ||
|
|
ca98e0c45a | ||
|
|
b672a344e3 | ||
|
|
29c4694842 | ||
|
|
22e449dc81 | ||
|
|
020af68951 | ||
|
|
8939188dac | ||
|
|
8ec6cd5ae0 | ||
|
|
7373d1da32 | ||
|
|
847ecdb24f | ||
|
|
f5af61304c | ||
|
|
4891ef94e2 | ||
|
|
fb865d9c6c | ||
|
|
00750c1c41 | ||
|
|
11bd3ce19c | ||
|
|
de8d93bfb4 | ||
|
|
ae190638d8 | ||
|
|
afaa10b176 | ||
|
|
d42e45b43c | ||
|
|
4d464a762a | ||
|
|
ffd1c80885 | ||
|
|
bfbfe93af0 | ||
|
|
f6f38e2fbd | ||
|
|
2473ac8e62 | ||
|
|
30e65782a2 | ||
|
|
4c9a1be489 | ||
|
|
d53f1dc247 | ||
|
|
772688cc9a | ||
|
|
813e390a6e | ||
|
|
358795ca77 | ||
|
|
5d145d020f | ||
|
|
63db4a6770 | ||
|
|
62d91a3f25 | ||
|
|
dbfaa1187d | ||
|
|
9e131743c5 | ||
|
|
2d3de3a988 | ||
|
|
bec414bd5c | ||
|
|
8b5f8bf427 | ||
|
|
69a14de876 | ||
|
|
0f5256b758 | ||
|
|
1fa8ece0b0 | ||
|
|
f3256f8c29 | ||
|
|
2dba844a59 | ||
|
|
66d53cf6f0 | ||
|
|
2eab162f8c | ||
|
|
0feab732e3 | ||
|
|
7e7e3a5c25 | ||
|
|
61aeb30a8a | ||
|
|
50901473db | ||
|
|
b95564ccc4 | ||
|
|
633755e3e5 | ||
|
|
55485ed6f6 | ||
|
|
898e9de371 | ||
|
|
52399585a6 | ||
|
|
666850cc2b | ||
|
|
45987d101b | ||
|
|
131af1a147 | ||
|
|
4db5e34305 | ||
|
|
e1bc6c18d2 | ||
|
|
4250869835 | ||
|
|
4e2fcfce5f | ||
|
|
edfc25832b | ||
|
|
bbdcb82e86 | ||
|
|
253ea3a5ba | ||
|
|
a618c44f4b | ||
|
|
2407391557 | ||
|
|
3e1d117b68 | ||
|
|
6f7bbe3d77 | ||
|
|
0c1e7d842c | ||
|
|
c92559c7cf | ||
|
|
b13b94bc99 | ||
|
|
138316ab33 | ||
|
|
9e603380fb | ||
|
|
85d2ea9eef | ||
|
|
1d63384de9 | ||
|
|
c7d628ee62 | ||
|
|
6662ce651b | ||
|
|
9366e19014 | ||
|
|
7af2433167 | ||
|
|
6fa6b64d9c | ||
|
|
3da371107d | ||
|
|
d953f5cde3 | ||
|
|
36d86e83cf | ||
|
|
238f896837 | ||
|
|
605dcb95db | ||
|
|
7ac354918d | ||
|
|
6bdda194ff | ||
|
|
837c97a15a | ||
|
|
c03b35cc5a | ||
|
|
c3213b6d39 | ||
|
|
eeec613888 | ||
|
|
ff83f19ee9 | ||
|
|
17f72be3ea | ||
|
|
f0ba2c9804 | ||
|
|
e27c12b3a0 | ||
|
|
fbe5a0babb | ||
|
|
d75cf059c0 | ||
|
|
06b039dac4 | ||
|
|
c99691fca5 | ||
|
|
baffa0703d | ||
|
|
78e76338c8 | ||
|
|
d7e42ae922 | ||
|
|
420e1d089c | ||
|
|
1bdbe67a54 | ||
|
|
39dda7c410 | ||
|
|
18d1069418 | ||
|
|
e7c54b3225 | ||
|
|
9f89e84b58 | ||
|
|
68b7d824ab | ||
|
|
e75e38271b | ||
|
|
1834229177 | ||
|
|
52bbdbd953 | ||
|
|
309dd31165 | ||
|
|
96ab308e6c | ||
|
|
b2b4e20817 | ||
|
|
d9d91ed53e | ||
|
|
bad3a266fb | ||
|
|
eb97cb07c0 | ||
|
|
1dd2050c47 | ||
|
|
578e9b6501 | ||
|
|
48ca510fb2 | ||
|
|
4ecb26203c | ||
|
|
465e8b8449 | ||
|
|
d9a89c26f9 | ||
|
|
99a12d3e76 | ||
|
|
1e07ef8daa | ||
|
|
6f5fc324ce | ||
|
|
749a7a43b4 | ||
|
|
0bf04a27fa | ||
|
|
1ee2032a38 | ||
|
|
25ebf298a0 | ||
|
|
da2727bd42 | ||
|
|
ee8936c96a | ||
|
|
4f2018d416 | ||
|
|
bd29d93293 | ||
|
|
f1c599a166 | ||
|
|
f4d35aefb7 | ||
|
|
135363068f | ||
|
|
8e8bc2b827 | ||
|
|
f916e61533 | ||
|
|
b05f40c33d | ||
|
|
05ec2d3479 | ||
|
|
0bd1ace8b5 | ||
|
|
267aabb361 | ||
|
|
e83703ee63 | ||
|
|
22d3fe0c5a | ||
|
|
b6b719e8b9 | ||
|
|
ec3ca97994 | ||
|
|
e37ab06fa3 | ||
|
|
e522f30140 | ||
|
|
1b710afb49 | ||
|
|
ca80ce3806 | ||
|
|
6ffb8264a2 | ||
|
|
aaf5f4250b | ||
|
|
f4a49617f3 | ||
|
|
c08d412edb | ||
|
|
6ea5aa0494 | ||
|
|
61ee38f3f2 | ||
|
|
09065420ed | ||
|
|
6a39482216 | ||
|
|
640a47bafc | ||
|
|
c02e8928df | ||
|
|
834fdb5088 | ||
|
|
4c99d4c328 | ||
|
|
3f89143650 | ||
|
|
652cfd16ab | ||
|
|
63afc00660 | ||
|
|
3eb49ad7b6 | ||
|
|
6911de3e7a | ||
|
|
673c3bff0e | ||
|
|
afd4b8a87b | ||
|
|
37e7fcf699 | ||
|
|
23a95d617b | ||
|
|
bfeac37ef4 | ||
|
|
dc2195d8a9 | ||
|
|
760ca33abc | ||
|
|
9debf45ed4 | ||
|
|
92d07a3446 | ||
|
|
11213d0e50 | ||
|
|
a69b382190 | ||
|
|
1f43ed5d8d | ||
|
|
191477645d | ||
|
|
b3190b2b8a | ||
|
|
2818e5f3ef | ||
|
|
6696213bbd | ||
|
|
9fe35de833 | ||
|
|
8f2ad5972d | ||
|
|
7aec08439a | ||
|
|
ca326c934f | ||
|
|
254d5b286a | ||
|
|
ad2bb0abb1 | ||
|
|
a36d86d0d7 | ||
|
|
165141acaf | ||
|
|
56e0ffbc24 | ||
|
|
0a41391984 | ||
|
|
1f2619cbd8 | ||
|
|
0d0d2daee0 | ||
|
|
3166b79356 | ||
|
|
72e1c95ebf | ||
|
|
aa886b6dfc | ||
|
|
9cad167f85 | ||
|
|
b6f78a3549 | ||
|
|
3b792a4496 | ||
|
|
03e5a58c75 | ||
|
|
a80f44b833 | ||
|
|
37bc1086b5 | ||
|
|
8ff089ec91 | ||
|
|
a1da27dea8 | ||
|
|
ff4f9f77f2 | ||
|
|
8eaf4b97b9 | ||
|
|
835a90813a | ||
|
|
a26bdb0666 | ||
|
|
1a25b65d0d | ||
|
|
bc87852873 | ||
|
|
44af128526 | ||
|
|
ab8b1a45e3 | ||
|
|
c0111255d7 | ||
|
|
335164df8b | ||
|
|
488e55ab2c | ||
|
|
d92d8d5e0f | ||
|
|
5d97bc9d20 | ||
|
|
8347ca3201 | ||
|
|
34033e7cec | ||
|
|
214bc53fae | ||
|
|
6ce63945c4 | ||
|
|
31c862b230 | ||
|
|
64c5638706 | ||
|
|
53dd49a25b | ||
|
|
6cb93fc4f9 | ||
|
|
ff90f7d9f6 | ||
|
|
3d5f737b53 | ||
|
|
029634df06 | ||
|
|
79f47536f1 | ||
|
|
27a57e0259 | ||
|
|
fdca7ea9f1 | ||
|
|
8f2f872113 | ||
|
|
46d3d5d4d8 | ||
|
|
5717ea3b5d | ||
|
|
809a9f99f1 | ||
|
|
67c780482b | ||
|
|
df4263a7ae | ||
|
|
624cf453bc | ||
|
|
18bd04b502 | ||
|
|
eaad560404 | ||
|
|
07daec5e7e | ||
|
|
24dc9509fe | ||
|
|
cd18291036 | ||
|
|
073c172b4c | ||
|
|
cbc1296898 | ||
|
|
2828ce0f6c | ||
|
|
bd5c8cb450 | ||
|
|
eb05f2cad4 | ||
|
|
37bdfa2332 | ||
|
|
49f7d8b712 | ||
|
|
5ce8a1f59a | ||
|
|
61c36b7f4d | ||
|
|
2fb13541b0 | ||
|
|
4b3c6de61b | ||
|
|
5fe3f04ba9 | ||
|
|
d6098f2c9c | ||
|
|
fa021ff3e5 | ||
|
|
8f2cd859e1 | ||
|
|
9df8b4ef19 | ||
|
|
17c8a79cf7 | ||
|
|
74211590b5 | ||
|
|
27f46c8bf8 | ||
|
|
e109ff7397 | ||
|
|
daa0ef3352 | ||
|
|
a10365e30d | ||
|
|
6f1c94c84f | ||
|
|
c06286b0f4 | ||
|
|
00367022a7 | ||
|
|
1281831d1c | ||
|
|
d17f5906d2 | ||
|
|
d04124a42e | ||
|
|
c149d1e962 | ||
|
|
9cb5bfcf2a | ||
|
|
d709cc4ed3 | ||
|
|
a95fafde1a | ||
|
|
16fe53a281 | ||
|
|
3c7632a9dc | ||
|
|
ab6b6ab09d | ||
|
|
652e3b1e06 | ||
|
|
4eb3cc9d97 | ||
|
|
6e7a06d7be | ||
|
|
4215ef6aa9 | ||
|
|
cff83d8124 | ||
|
|
1467fce54c | ||
|
|
9be7bacb18 | ||
|
|
b76b4ffcc4 | ||
|
|
687e3bcb18 | ||
|
|
41b02d4e90 | ||
|
|
19854af8d8 | ||
|
|
ca7b63743e | ||
|
|
9d5cdf11ae | ||
|
|
d4a24f152a | ||
|
|
e7c24f1f01 | ||
|
|
c40c1fafc9 | ||
|
|
431d6d6f59 | ||
|
|
2e67c13fe3 | ||
|
|
87bcacdeb4 | ||
|
|
728757fbdd | ||
|
|
9404dfb89e | ||
|
|
075b268805 | ||
|
|
632941602b | ||
|
|
4ea1d13d26 | ||
|
|
d3f68e7d52 | ||
|
|
5e1ae88b74 | ||
|
|
a36f20558f | ||
|
|
926503fa3f | ||
|
|
5d0e6ff464 | ||
|
|
c81cbe9550 | ||
|
|
4e26676290 | ||
|
|
5159a594c3 | ||
|
|
d130ec5785 | ||
|
|
252b9f6f8b | ||
|
|
50dfd34754 | ||
|
|
a1a9db6357 | ||
|
|
a75fa16527 | ||
|
|
a67e5ef83b | ||
|
|
f4ba415202 | ||
|
|
98e7efa9a0 | ||
|
|
7dd2e1184b | ||
|
|
e1ea3795bb | ||
|
|
95237a22a9 | ||
|
|
11c93c5f53 | ||
|
|
b59b8621c5 | ||
|
|
44c61d9a58 | ||
|
|
63a17bc14b | ||
|
|
f4f93bb24d | ||
|
|
7561622bc8 | ||
|
|
b041566aba | ||
|
|
cb72158abc | ||
|
|
5c432d094f | ||
|
|
24ac48b3b1 | ||
|
|
c03060fe3c | ||
|
|
3ebd5141ae | ||
|
|
c16006dc4b | ||
|
|
8fc465b3e8 | ||
|
|
ce689bdff3 | ||
|
|
e23386ddc7 | ||
|
|
0f17d63774 | ||
|
|
4fc3949367 | ||
|
|
e19c04377b | ||
|
|
7c3f429c56 | ||
|
|
7558489ad0 | ||
|
|
4a3880b5ae | ||
|
|
ca7a4abd30 | ||
|
|
a4a45de161 | ||
|
|
358a286523 | ||
|
|
3bbab0027b | ||
|
|
8afe917a6c | ||
|
|
f5fec5e6bb | ||
|
|
0b81743683 | ||
|
|
9f715c3224 | ||
|
|
24f515ccb4 | ||
|
|
fd531242c9 | ||
|
|
3855bd257d | ||
|
|
c98b54ff15 | ||
|
|
d93d50d038 | ||
|
|
448365c7a0 | ||
|
|
515a863195 | ||
|
|
8d0e23bde1 | ||
|
|
dc8f62a4ad | ||
|
|
896e65545e | ||
|
|
cd4a4b1dcf | ||
|
|
38a0737afb | ||
|
|
4a2768b81d | ||
|
|
00e08b8402 | ||
|
|
48e8584e13 | ||
|
|
a89e30fe75 | ||
|
|
a01fcdad28 | ||
|
|
2a99529921 | ||
|
|
c934405a3e | ||
|
|
b8d922fcb7 | ||
|
|
eb499833c6 | ||
|
|
dd98f7f043 | ||
|
|
e8978ef91c | ||
|
|
669ff1cadf | ||
|
|
4ce85fdb19 | ||
|
|
035ddc4834 | ||
|
|
c2f40b8503 | ||
|
|
cf738a1c14 | ||
|
|
52d40c2321 | ||
|
|
cbf12d6b46 | ||
|
|
ab26a65b6a | ||
|
|
ee5aaf5383 | ||
|
|
1c1714b2c2 | ||
|
|
accb017ec5 | ||
|
|
304782d583 | ||
|
|
f361f436d8 | ||
|
|
a34b5a6122 | ||
|
|
f75ea18ccb | ||
|
|
9a06c40a28 | ||
|
|
e6ab97dc5a | ||
|
|
ba73f757e2 | ||
|
|
30f131096d | ||
|
|
b8ce922f92 | ||
|
|
11b62345e1 | ||
|
|
77289ecb51 | ||
|
|
dfb0b68997 | ||
|
|
d545f60fc4 | ||
|
|
5cda6e9d84 | ||
|
|
7caba89210 | ||
|
|
b8967b75c6 | ||
|
|
74d9849472 | ||
|
|
96b753cfd0 | ||
|
|
5a89e66fc0 | ||
|
|
b4a143b9de | ||
|
|
050035dd52 | ||
|
|
7018062606 | ||
|
|
9e1485de0a | ||
|
|
4e358b891f | ||
|
|
4044a9df30 | ||
|
|
5a7b675001 | ||
|
|
3be4e4bc57 | ||
|
|
5de51919bb | ||
|
|
b02b00818b | ||
|
|
010f88a2ad | ||
|
|
60edf4835f | ||
|
|
a60450d931 | ||
|
|
d138fa45df | ||
|
|
2c2c497c12 | ||
|
|
cb5d3840d9 | ||
|
|
9aceaa7a4d | ||
|
|
636c8ba384 | ||
|
|
ac78eb1425 | ||
|
|
65ad3fe623 | ||
|
|
dcec90fc52 | ||
|
|
24ac32e6e6 | ||
|
|
26f5ffdde3 | ||
|
|
a883426402 | ||
|
|
2f21e930e2 | ||
|
|
5fb158635c | ||
|
|
6f844f9ebb | ||
|
|
d88e358016 | ||
|
|
9cf2635528 | ||
|
|
d0e7579f13 | ||
|
|
cda82b0ea0 | ||
|
|
2ecbb18fe5 | ||
|
|
d40d2389a9 | ||
|
|
df8fb5cab7 | ||
|
|
99ad211c01 | ||
|
|
fb4ed20ff5 | ||
|
|
cb50b44d8f | ||
|
|
ae57853ec4 | ||
|
|
2881c0fd7e | ||
|
|
483fb0968b | ||
|
|
4d37418c15 | ||
|
|
e8ee4b50ff | ||
|
|
4f8aa2eee2 | ||
|
|
397d3cb45a | ||
|
|
e883d727fb | ||
|
|
986545a140 | ||
|
|
836307b0c7 | ||
|
|
b5a75d3079 | ||
|
|
c32067759c | ||
|
|
7fb7abb593 | ||
|
|
0d50b58c60 | ||
|
|
bdf4e24266 | ||
|
|
f41bdf1acb | ||
|
|
77d691df59 | ||
|
|
12300761ab | ||
|
|
25efcbda81 | ||
|
|
a01f96e0e4 | ||
|
|
1d1e3ba79d | ||
|
|
2c9c50711f | ||
|
|
d3f0ab8c6d | ||
|
|
80a3a8a43c | ||
|
|
e6e6eb323d | ||
|
|
681a5bafb4 | ||
|
|
5bec89ecc8 | ||
|
|
69ed0edb74 | ||
|
|
ad5925908e | ||
|
|
d186245c5c | ||
|
|
bbbab4b8a4 | ||
|
|
f83080eb8d | ||
|
|
e0178fa0ea | ||
|
|
c6a79ca176 | ||
|
|
6426e6cc49 | ||
|
|
b13cb098ce | ||
|
|
afda5ca98f | ||
|
|
eb57d87513 | ||
|
|
fbf6b9826e | ||
|
|
a01b29a6bd | ||
|
|
102992b095 | ||
|
|
bd69905f2e | ||
|
|
ce5a4bd94a | ||
|
|
f65a613815 | ||
|
|
d87c8468bd | ||
|
|
aa829af43b | ||
|
|
c10fda8363 | ||
|
|
4252284405 | ||
|
|
74d65b37a8 | ||
|
|
78f95e4859 | ||
|
|
91626dea45 | ||
|
|
5868d9969a | ||
|
|
90490c9c84 | ||
|
|
8ea794baef | ||
|
|
70a6c3e8e5 | ||
|
|
4813803c49 | ||
|
|
fe60cf003f | ||
|
|
0c357bc340 | ||
|
|
b711288faa | ||
|
|
44a5d86641 | ||
|
|
e7048aa9cf | ||
|
|
0120a85c39 | ||
|
|
a41d047f58 | ||
|
|
cccccb4dd6 | ||
|
|
0a64e31625 | ||
|
|
3c6c6c3706 | ||
|
|
8088b58b3b | ||
|
|
a7d5d51fb4 | ||
|
|
378d7987a8 | ||
|
|
3e0baf82a4 | ||
|
|
7a2683a06b | ||
|
|
17a3c90286 | ||
|
|
6341770768 | ||
|
|
308437ec93 | ||
|
|
d3d4916d6c | ||
|
|
d2fa00f0c6 | ||
|
|
d6c9652a70 | ||
|
|
0d20b73e76 | ||
|
|
3c655cdd5a | ||
|
|
fc5cd3a9ca | ||
|
|
83ab926f96 | ||
|
|
56e54e0724 | ||
|
|
544e4fb89a | ||
|
|
966c3a8f47 | ||
|
|
c2ab72c77e | ||
|
|
4468ee3142 | ||
|
|
c82c2c0ba4 | ||
|
|
6e595a0959 | ||
|
|
a79d709039 | ||
|
|
538a07542e | ||
|
|
07ed765250 | ||
|
|
2e497b5834 | ||
|
|
61b3cecd17 | ||
|
|
a4a666bb80 | ||
|
|
c14621a09f | ||
|
|
d0a8899daf | ||
|
|
65dbcb3e5f | ||
|
|
7f725b67c4 | ||
|
|
e25252dc69 | ||
|
|
8b65c11e1e | ||
|
|
320c5eac53 | ||
|
|
8199e0d2d5 | ||
|
|
53387f5a0c | ||
|
|
7d171a79d7 | ||
|
|
3b99bb9e78 | ||
|
|
132f026c75 | ||
|
|
abd0f9630c | ||
|
|
a4508ec84f | ||
|
|
6119b6ab89 | ||
|
|
307ac47ce0 | ||
|
|
4032ddd4fd | ||
|
|
98c8dc05f1 | ||
|
|
4c677ec2da | ||
|
|
c05692e417 | ||
|
|
1e7aa89664 | ||
|
|
ae1edf3c5c | ||
|
|
b17f41c3e8 | ||
|
|
08db4ba54b | ||
|
|
cb6cc39679 | ||
|
|
b6bf6c994c | ||
|
|
3bb4709563 | ||
|
|
b280c768a4 | ||
|
|
d23e89fb9c | ||
|
|
3a27bd0318 | ||
|
|
616513edaf | ||
|
|
09a51020e9 | ||
|
|
cb8cb94d1a | ||
|
|
2440dc0089 | ||
|
|
2336eef333 | ||
|
|
a0e948627c | ||
|
|
88159af588 | ||
|
|
38b77bb550 | ||
|
|
e72d1d0b6f | ||
|
|
1891622e69 | ||
|
|
628a112b38 | ||
|
|
50f5d760c9 | ||
|
|
7292a88ea3 | ||
|
|
07cb3ab576 | ||
|
|
27b749abbd | ||
|
|
27f67a077c | ||
|
|
393e15815b | ||
|
|
a7f1cd25b9 | ||
|
|
953cd2ae0c | ||
|
|
a84a7dbc3d | ||
|
|
24d01f1ab2 | ||
|
|
06eb890761 | ||
|
|
6d0345d327 | ||
|
|
1c67233eb0 | ||
|
|
b4281c5a70 | ||
|
|
5f6b66dad6 | ||
|
|
c2be0af9d9 | ||
|
|
c111e9a35a | ||
|
|
a53a85d788 | ||
|
|
a44c18e9b7 | ||
|
|
4d78437fe4 | ||
|
|
2bfe2c8ff8 | ||
|
|
65da844d70 | ||
|
|
5275c27ee1 | ||
|
|
390580a19d | ||
|
|
147917454f | ||
|
|
39562775d9 | ||
|
|
4a0ef1f834 | ||
|
|
85b16b674d | ||
|
|
ab5d8ba120 | ||
|
|
28076335e0 | ||
|
|
9e9333424f | ||
|
|
6f0faae4ce | ||
|
|
0d24828539 | ||
|
|
0a6d724f2c | ||
|
|
8956e1e0cf | ||
|
|
c9ae991aa3 | ||
|
|
421d594507 | ||
|
|
9c03f2e468 | ||
|
|
1175ff5867 | ||
|
|
55df593561 | ||
|
|
a06a663b94 | ||
|
|
3d2f7e731f | ||
|
|
2575372639 | ||
|
|
faa6e8324a | ||
|
|
d0e3fb1901 | ||
|
|
04287c5073 | ||
|
|
0c76fdd36c | ||
|
|
d582942244 | ||
|
|
3636626e09 | ||
|
|
3e0919106d | ||
|
|
d385838dc1 | ||
|
|
e28f1e8ceb | ||
|
|
3d875f1ce5 | ||
|
|
c4c5397b44 | ||
|
|
6b6f9b2405 | ||
|
|
7d4a8d03a4 | ||
|
|
e9119da040 | ||
|
|
aa36dc95ef | ||
|
|
a6f9409a39 | ||
|
|
41a113e22c | ||
|
|
4cfcdb0c96 | ||
|
|
36050f580e | ||
|
|
98760b631b | ||
|
|
d00aa1e77a | ||
|
|
dce391a248 | ||
|
|
c252118cfc | ||
|
|
e9fd32de79 | ||
|
|
788246a56f | ||
|
|
bc02fe3831 | ||
|
|
d290aad27b | ||
|
|
6754ec5e10 | ||
|
|
1ba00a66eb | ||
|
|
1dd7d33e23 | ||
|
|
e200548e35 | ||
|
|
fdf7b69996 | ||
|
|
92d36b725f | ||
|
|
4e131858ca | ||
|
|
a45d95905e | ||
|
|
0fdfdabf2a | ||
|
|
a25e967978 | ||
|
|
38e30c7513 | ||
|
|
e38e5fa17d | ||
|
|
c1f9bedf2f | ||
|
|
dd5d0ea2b3 | ||
|
|
42fd29d38b | ||
|
|
bf6d3aa324 | ||
|
|
023ccc6563 | ||
|
|
da49db5b9e | ||
|
|
cc8dda28cc | ||
|
|
47300c1d44 | ||
|
|
d31550d444 | ||
|
|
51f37350eb | ||
|
|
ecfa161da8 | ||
|
|
e3778c17ea | ||
|
|
cbc95415b7 | ||
|
|
776c0aa488 | ||
|
|
327eb0219d | ||
|
|
8507b6a1f0 | ||
|
|
a853748303 | ||
|
|
192e884e4a | ||
|
|
7001ad1445 | ||
|
|
5cfb133f79 | ||
|
|
5df24edebf | ||
|
|
95d0293a96 | ||
|
|
f5a2efb57c | ||
|
|
e4b9ae4eee | ||
|
|
bc1ac5a37f | ||
|
|
96ac56faac | ||
|
|
f0bc444388 | ||
|
|
8584f47d95 | ||
|
|
f6235b8c08 | ||
|
|
d452e90470 | ||
|
|
418a869451 | ||
|
|
cf89e2215c | ||
|
|
a4ca1ef1a8 | ||
|
|
c38572307d | ||
|
|
20902df122 | ||
|
|
d31ddb72f3 | ||
|
|
d5f2d86bd2 | ||
|
|
2ce8bcd565 | ||
|
|
75c92eaa93 | ||
|
|
0445adcac3 | ||
|
|
c45ff61954 | ||
|
|
06dd4c5026 | ||
|
|
058caadf4f | ||
|
|
7b7d309105 | ||
|
|
63be7b93ce | ||
|
|
578ea12b59 | ||
|
|
364e59be57 | ||
|
|
fece4dac9e | ||
|
|
ce85c1aabc | ||
|
|
0ac2ce5e72 | ||
|
|
391c800bf5 | ||
|
|
9c27b58194 | ||
|
|
f6471cf8f9 | ||
|
|
f21e9bcc4d | ||
|
|
1eaff753a6 | ||
|
|
9b3a8897cd | ||
|
|
40f8cddfb2 | ||
|
|
c29d5de1eb | ||
|
|
d94c171d63 | ||
|
|
2717967d61 | ||
|
|
53203dbcef | ||
|
|
9e66f8ac11 | ||
|
|
796fb3b4cd | ||
|
|
473ecbdf2d | ||
|
|
7b3703506b | ||
|
|
5816f76bbe | ||
|
|
355996bafc | ||
|
|
c2bb46f41d | ||
|
|
12f76c24b1 | ||
|
|
4b8ebc9a17 | ||
|
|
42a109e593 | ||
|
|
8064e68873 | ||
|
|
3dc0d0bb92 | ||
|
|
2bb8f92af1 | ||
|
|
5b7d5d2b93 | ||
|
|
2b27db18d8 | ||
|
|
f3c811cc03 | ||
|
|
df415208a4 | ||
|
|
77fd01bd9f | ||
|
|
fa3a9570d6 | ||
|
|
c06a5ac96c | ||
|
|
33467b42da | ||
|
|
13fb641113 | ||
|
|
53f17c2baa | ||
|
|
06a57ef811 | ||
|
|
86a09b16ff | ||
|
|
c70d7535b9 | ||
|
|
8541360bf3 | ||
|
|
2a832d36d7 | ||
|
|
1578c89475 | ||
|
|
5c13e54149 | ||
|
|
8e74cf6633 | ||
|
|
bab6b36e4d | ||
|
|
f75e616397 | ||
|
|
941a9c3b39 | ||
|
|
7ba0f604e6 | ||
|
|
cf8a4cc939 | ||
|
|
ee78daeeef | ||
|
|
2f6b0b1a55 | ||
|
|
c048074c31 | ||
|
|
5ca89709e3 | ||
|
|
5a88ff0811 | ||
|
|
de68c251f8 | ||
|
|
7c9ae3561d | ||
|
|
b608ece57e | ||
|
|
8dfffebaf1 | ||
|
|
109a3bb2b9 | ||
|
|
fef37f739b | ||
|
|
7a5615182a | ||
|
|
02a7003ffe | ||
|
|
1571f14815 | ||
|
|
9cb098ad8a | ||
|
|
6283f5952d | ||
|
|
9b9edbae0e | ||
|
|
491155d1cf | ||
|
|
54207254f1 | ||
|
|
1395dcc0be | ||
|
|
2a68d9095d | ||
|
|
a984b3640e | ||
|
|
f9c1e411aa | ||
|
|
f6cbc32ee7 | ||
|
|
602614acf6 | ||
|
|
3854b7d472 | ||
|
|
5e25481088 | ||
|
|
fe86e15d80 | ||
|
|
179b4a69eb | ||
|
|
eee6307789 | ||
|
|
9fc5002619 | ||
|
|
faa6ae284a | ||
|
|
8b4355b21d | ||
|
|
e8835da740 | ||
|
|
75854e104e | ||
|
|
93d06e3f4d | ||
|
|
c560b9229c | ||
|
|
935e268dec | ||
|
|
3a1c716c73 | ||
|
|
f3457502a6 | ||
|
|
7ded802df4 | ||
|
|
d3cd1d1b15 | ||
|
|
f5a75c6319 | ||
|
|
ae3a5c5f5e | ||
|
|
43792e2426 | ||
|
|
551d639951 | ||
|
|
c367a71223 | ||
|
|
d259ef0348 | ||
|
|
288cbf4a80 | ||
|
|
ba5e5a780f | ||
|
|
73fa3c3fe4 | ||
|
|
579eb85175 | ||
|
|
b2b20072ae | ||
|
|
a2c4d3fe95 | ||
|
|
31e2be2e4d | ||
|
|
9f5d97e1c6 | ||
|
|
baaae6cd9f | ||
|
|
ed398aa7b9 | ||
|
|
6e2ae42dab | ||
|
|
7f832ad783 | ||
|
|
2ce6f8cb6c | ||
|
|
2574125199 | ||
|
|
41bf2b2c42 | ||
|
|
51bac394ec | ||
|
|
b696649c9d | ||
|
|
b4828ad8de | ||
|
|
639d634426 | ||
|
|
5358fc4f43 | ||
|
|
6a654ab90b | ||
|
|
99eda80a78 | ||
|
|
a6182acc9c | ||
|
|
2241e4d8ea | ||
|
|
cbbdea1ba4 | ||
|
|
05e7c98620 | ||
|
|
1f1d618dea | ||
|
|
b18117ef89 | ||
|
|
44cb796574 | ||
|
|
ccf60ffc4b | ||
|
|
f69db11f42 | ||
|
|
96a680dcf0 | ||
|
|
c8367c9b7a | ||
|
|
c612663490 | ||
|
|
de5d967d18 | ||
|
|
7fc63f7847 | ||
|
|
49009cbcad | ||
|
|
b5fbeffb86 | ||
|
|
146655e997 | ||
|
|
87d66f04d8 | ||
|
|
bb27dd0c3b | ||
|
|
f45a1c232f | ||
|
|
d7a3c12bbe | ||
|
|
a1e84f5a88 | ||
|
|
b758737907 | ||
|
|
c488c14d25 | ||
|
|
5e0cca0702 | ||
|
|
8559e46e4a | ||
|
|
4bc00e00e3 | ||
|
|
3e777df86c | ||
|
|
278b4e810d | ||
|
|
346c7cd743 | ||
|
|
867bf97d8f | ||
|
|
8a67949168 | ||
|
|
5baa51d547 | ||
|
|
616db337e1 | ||
|
|
3895871462 | ||
|
|
a87b84fbe2 | ||
|
|
b2f0ace9db | ||
|
|
20c95e2606 | ||
|
|
22dccaeddb | ||
|
|
e611a70ba4 | ||
|
|
66845d7080 | ||
|
|
4ea7278c6f | ||
|
|
2b2e26f14b | ||
|
|
b496ef8d6f | ||
|
|
7f5e83141d | ||
|
|
2d1ca98605 | ||
|
|
eaa4c318e3 | ||
|
|
31373fd1ba | ||
|
|
9086246947 | ||
|
|
7855b70682 | ||
|
|
0ce87153e5 | ||
|
|
dba1711e8d | ||
|
|
a70b057e1c | ||
|
|
9a5ffea0ad | ||
|
|
96f4b771ea | ||
|
|
3df143dd3d | ||
|
|
d78d7c726e | ||
|
|
d0ad580c7d | ||
|
|
4a8a2a70b5 | ||
|
|
20a71b7df2 | ||
|
|
68412b3901 | ||
|
|
93a7c60a15 | ||
|
|
31e5058b15 | ||
|
|
14cff958e9 | ||
|
|
9628f147f1 | ||
|
|
13e346d4eb | ||
|
|
e507ce2f26 | ||
|
|
9c62622733 | ||
|
|
62aa0cef39 | ||
|
|
401953313a | ||
|
|
4d2403d619 | ||
|
|
c5f261305d | ||
|
|
394f58f6cc | ||
|
|
674bf1b0e0 | ||
|
|
606ddd8a9b | ||
|
|
e23a1fac50 | ||
|
|
342323a7e6 | ||
|
|
efb410444b | ||
|
|
17c9b4c5d3 | ||
|
|
706de8e2f1 | ||
|
|
23bc11f3b6 | ||
|
|
4eb7dde1c8 | ||
|
|
064861b930 | ||
|
|
afa910bbd7 | ||
|
|
6aceb24fd2 | ||
|
|
d94e86781f | ||
|
|
0d4a3b1ad4 | ||
|
|
acfcb18f29 | ||
|
|
f7ff8e3837 | ||
|
|
048e17c62b | ||
|
|
d89b4f7e95 | ||
|
|
795b226b90 | ||
|
|
e485c380e0 | ||
|
|
bb4f4bc441 | ||
|
|
65b49b2d9c | ||
|
|
9e7010f185 | ||
|
|
3bb8e5bb00 | ||
|
|
2a4d1da2ca | ||
|
|
6b71b66bd2 | ||
|
|
ebf24fb125 | ||
|
|
46d64b949e | ||
|
|
6919354520 | ||
|
|
a42fe9bfb0 | ||
|
|
ee1f8b34ea | ||
|
|
c910fa406d | ||
|
|
559205e33f | ||
|
|
c0756e9c60 | ||
|
|
bf1190696e | ||
|
|
71dd0890de | ||
|
|
e5acdf1402 | ||
|
|
0f08b6bb59 | ||
|
|
6198a7b69a | ||
|
|
067aee6664 | ||
|
|
138a2ebbd0 | ||
|
|
296f6a7a88 | ||
|
|
069ffa9921 | ||
|
|
f42fd8a840 | ||
|
|
10f27af6f2 | ||
|
|
0bbd34d060 | ||
|
|
282daeb0dc | ||
|
|
d33b313c11 | ||
|
|
fb7316c9ae | ||
|
|
279b0a51d9 | ||
|
|
6547d5ebf3 | ||
|
|
4f1ef9a039 | ||
|
|
4c80714d19 | ||
|
|
077ead71a5 | ||
|
|
caba110266 | ||
|
|
0fdb23c1e9 | ||
|
|
13a84f0c72 | ||
|
|
669bd58e33 | ||
|
|
6e82740a9b | ||
|
|
7ea43a728d | ||
|
|
71b38356b1 | ||
|
|
5a99708f56 | ||
|
|
24191d9599 | ||
|
|
482ea8eb40 | ||
|
|
1dae05651f | ||
|
|
5164e92538 | ||
|
|
f89a20dbc7 | ||
|
|
3a4c5a2bfb | ||
|
|
5e1334e8de | ||
|
|
fa6e3d3690 | ||
|
|
9383e7716b | ||
|
|
cfe34fbf0f | ||
|
|
9fe110625c | ||
|
|
975f753c2b | ||
|
|
e6237480f8 | ||
|
|
966d4e29d4 | ||
|
|
26f876a2cb | ||
|
|
ab9e6ac48a | ||
|
|
c1d6c04ab2 | ||
|
|
888cec3d56 | ||
|
|
1461bcc2c2 | ||
|
|
11f1cf80bd | ||
|
|
c675cc8b26 | ||
|
|
0011b8925b | ||
|
|
73ea6e4251 | ||
|
|
e4441dddbb | ||
|
|
8d1d56f694 | ||
|
|
2015ba77ca | ||
|
|
7033a0f68f | ||
|
|
6ada76da7f | ||
|
|
cbdec0cb22 | ||
|
|
de6e9d31c9 | ||
|
|
f0a6be32fc | ||
|
|
5c4855cca6 | ||
|
|
2e1e380418 | ||
|
|
d07f0b4f71 | ||
|
|
aaa2a6eef1 | ||
|
|
b1f56c3324 | ||
|
|
da5c0ae4b6 | ||
|
|
1e1394560d | ||
|
|
bae0196bcf | ||
|
|
3398955c1a | ||
|
|
a1b925d1e0 | ||
|
|
31c0c3275f | ||
|
|
0a4392f700 | ||
|
|
eb86986cf4 | ||
|
|
1053a47e42 | ||
|
|
99b1f48e0e | ||
|
|
c21eb6aa50 | ||
|
|
6dddf54222 | ||
|
|
9e3eb2319e | ||
|
|
1d8dcda815 | ||
|
|
ee52a84262 | ||
|
|
eb51e81faa | ||
|
|
d41ef1df18 | ||
|
|
66d47aff2c | ||
|
|
c931103712 | ||
|
|
ad1aeea74b | ||
|
|
ae7f8af03e | ||
|
|
a52c91a665 | ||
|
|
94bf3a3902 | ||
|
|
f5a539e128 | ||
|
|
24480b2090 | ||
|
|
a124b3abe9 | ||
|
|
090d722b61 | ||
|
|
d27ec6fe8d | ||
|
|
8d34f3447b | ||
|
|
72b52965b9 | ||
|
|
ae7077c643 | ||
|
|
11598e855f | ||
|
|
534c577f59 | ||
|
|
7762afc497 | ||
|
|
a3fe4b9980 | ||
|
|
598599cd14 | ||
|
|
07cd69ab34 | ||
|
|
3b764bed7a | ||
|
|
c91d5c2fdb | ||
|
|
40f7e6e994 | ||
|
|
ee9aa9ce12 | ||
|
|
08304bf375 | ||
|
|
8b8c6237be | ||
|
|
c0837104cd | ||
|
|
fe21d014f7 | ||
|
|
75c5032cd3 | ||
|
|
f84e7aebd0 | ||
|
|
c379a3d297 | ||
|
|
eedeaaecee | ||
|
|
64eeb1e361 | ||
|
|
e07597eba7 | ||
|
|
5f2656710c | ||
|
|
1af53f2612 | ||
|
|
c89cfa4927 | ||
|
|
bbde93a3c7 | ||
|
|
b01b76d78f | ||
|
|
75c22038eb | ||
|
|
3c1705994d | ||
|
|
439d2f5df8 | ||
|
|
d2bc3c7360 | ||
|
|
9734433f00 | ||
|
|
5bd08800bb | ||
|
|
3032415141 | ||
|
|
ba58a95a0f | ||
|
|
aa4bd92fee | ||
|
|
f37c76dab1 | ||
|
|
863969c77c | ||
|
|
2383aaaa3d | ||
|
|
715d1157ad | ||
|
|
4aaae3f445 | ||
|
|
8359ef73f4 | ||
|
|
c6bb649adb | ||
|
|
e333cbd94d | ||
|
|
cc9a825279 | ||
|
|
5189cbe5c7 | ||
|
|
d1d6e5c652 | ||
|
|
3e5087e60b | ||
|
|
93c3cea912 | ||
|
|
e824b861d4 | ||
|
|
e8dd1e0bf2 | ||
|
|
533afa4c6e | ||
|
|
559026933d | ||
|
|
7864405efd | ||
|
|
a5575902de | ||
|
|
5b9bce59e1 | ||
|
|
041aed2d72 | ||
|
|
02a296e500 | ||
|
|
98e41f9a37 | ||
|
|
6a71d369e2 | ||
|
|
75661fa800 | ||
|
|
df5498e1c0 | ||
|
|
c0af911197 | ||
|
|
44bc90e5ab | ||
|
|
5c1cde1b28 | ||
|
|
3172b571c6 | ||
|
|
17e8b77e88 | ||
|
|
8011935a3b | ||
|
|
3f3052c23c | ||
|
|
8f17f45339 | ||
|
|
009e2eeb97 | ||
|
|
c70fa48835 | ||
|
|
bd5f5c407b | ||
|
|
2bc573a53d | ||
|
|
537d61d5bd | ||
|
|
09519ae942 | ||
|
|
2a67b2e610 | ||
|
|
8161f55a82 | ||
|
|
ecee189ad8 | ||
|
|
ef0900f3ac | ||
|
|
383d744bd8 | ||
|
|
c2ba8ab562 | ||
|
|
cd49ea43c0 | ||
|
|
53aa45a2bb | ||
|
|
83e0a19561 | ||
|
|
6a5d475198 | ||
|
|
49ccbba2e3 | ||
|
|
41735ed40e | ||
|
|
2d11a433c9 | ||
|
|
e79ab2521f | ||
|
|
fb1f99da87 | ||
|
|
08c6a8c2e5 | ||
|
|
ce3835e176 | ||
|
|
39f6eadbb9 | ||
|
|
16dba09b61 | ||
|
|
d5ebf2f2ed | ||
|
|
8a8e6e7b49 | ||
|
|
34e21b9f7b | ||
|
|
98a31d1474 | ||
|
|
72a0c1be0f | ||
|
|
5b25e38e41 | ||
|
|
2fb400280b | ||
|
|
79ad09524e | ||
|
|
5f8accb492 | ||
|
|
6fcadc2297 | ||
|
|
3f4e1522eb | ||
|
|
6304c84cdb | ||
|
|
894297efa9 | ||
|
|
a51a7a0901 | ||
|
|
372e131e25 | ||
|
|
6c6e6a4975 | ||
|
|
cd66a1ceb7 | ||
|
|
feb59deb28 | ||
|
|
489519a982 | ||
|
|
a96865d0f5 | ||
|
|
12e11609a9 | ||
|
|
5b404095b0 | ||
|
|
6a6555e2d5 | ||
|
|
49489a6021 | ||
|
|
8cd93d68e4 | ||
|
|
f3b9a8d97f | ||
|
|
b91a69d8b3 | ||
|
|
624e40e3b7 | ||
|
|
23a076a204 | ||
|
|
016141a05d | ||
|
|
a064b25a14 | ||
|
|
bd40e32f3b | ||
|
|
81a21c0d5f | ||
|
|
6478210330 | ||
|
|
aa1c37fe26 | ||
|
|
6ee23b0186 | ||
|
|
40eb445592 | ||
|
|
ce7d687205 | ||
|
|
758900b7a8 | ||
|
|
539b62a829 | ||
|
|
2866f1b213 | ||
|
|
fc1465c05d | ||
|
|
bc887ec6fa | ||
|
|
84b3d324bb | ||
|
|
fc10108788 | ||
|
|
fbbc1bec58 | ||
|
|
2059bb5ef8 | ||
|
|
b080a5db4d | ||
|
|
b4aabd799b | ||
|
|
92f035bc2a | ||
|
|
18a6df34bd | ||
|
|
b1274125c9 | ||
|
|
dceebc1c8d | ||
|
|
6aadb4b458 | ||
|
|
703405b874 | ||
|
|
d1735c7e57 | ||
|
|
1f815b49dd | ||
|
|
a9339b7037 | ||
|
|
f2c6ca182d | ||
|
|
b946c27a20 | ||
|
|
9fd6358518 | ||
|
|
8a8a848fac | ||
|
|
aeb9f67266 | ||
|
|
e08c5a412e | ||
|
|
a7443a9ece | ||
|
|
54fe3b9a43 | ||
|
|
ba522b1691 | ||
|
|
739c5bf22c | ||
|
|
7cdadeb791 | ||
|
|
dadf43b93e | ||
|
|
bd820e6d2e | ||
|
|
19f7b207b7 | ||
|
|
a398e2269c | ||
|
|
2e28fb97a4 | ||
|
|
5c68d83a93 | ||
|
|
0b7c3ad745 | ||
|
|
0cde06557d | ||
|
|
27844fe692 | ||
|
|
779051ef9f | ||
|
|
d13741fbd5 | ||
|
|
f7f870fe62 | ||
|
|
de59aa099d | ||
|
|
57a478b898 | ||
|
|
3e8d79e147 | ||
|
|
a46045d987 | ||
|
|
662c905b80 | ||
|
|
31022aeb79 | ||
|
|
b3e6a50dee | ||
|
|
d29764d11f | ||
|
|
f8e4f6727a | ||
|
|
63d05df8a3 | ||
|
|
52d13d1d62 | ||
|
|
f58a320223 | ||
|
|
3e01bc1174 | ||
|
|
d1ada7f998 | ||
|
|
095fc8140e | ||
|
|
73c368ea86 | ||
|
|
ce5edbb7fc | ||
|
|
a680639718 | ||
|
|
becf6afbdd | ||
|
|
1dda015c6a | ||
|
|
a0427ecf8c | ||
|
|
cfd31e98ff | ||
|
|
bcb89924b4 | ||
|
|
23f9199439 | ||
|
|
1f6318a919 | ||
|
|
b0667b258b | ||
|
|
4c3a48f5be | ||
|
|
33fb7a72de | ||
|
|
2c808e369c | ||
|
|
906d0be382 | ||
|
|
1c9a3c6105 | ||
|
|
2aaddd721f | ||
|
|
4e2284b83f | ||
|
|
d5d9978e48 | ||
|
|
d45659ac76 | ||
|
|
13a07dc6cd | ||
|
|
51b7a8d868 | ||
|
|
df9c0051c9 | ||
|
|
331ff83cd5 | ||
|
|
44838d6238 | ||
|
|
5400abb065 | ||
|
|
f47fefb73e | ||
|
|
cdef745a7a | ||
|
|
1a1eab4ec0 | ||
|
|
3a966ef345 | ||
|
|
be20c04cd8 | ||
|
|
d09dcc90fe | ||
|
|
1fd1207bf6 | ||
|
|
0117fc12c7 | ||
|
|
ef9a7fda9a | ||
|
|
13447df1e0 | ||
|
|
3608c5bfb0 | ||
|
|
34dbff6786 | ||
|
|
a6066bfc2f | ||
|
|
8579190cdf | ||
|
|
917f667229 | ||
|
|
317a551bdb | ||
|
|
27e9271473 | ||
|
|
11dff6c546 | ||
|
|
e6712937ca | ||
|
|
cf8887bb5a | ||
|
|
696340f780 | ||
|
|
86ddcbaa08 | ||
|
|
2144d2a8d8 | ||
|
|
f7af861b31 | ||
|
|
208a09b3ae | ||
|
|
831023e41d | ||
|
|
ff627793d6 | ||
|
|
f971c76a99 | ||
|
|
8f41176c76 | ||
|
|
31bbbbb5e0 | ||
|
|
effcd6038d | ||
|
|
12be7d49c2 | ||
|
|
14863b575e | ||
|
|
32a95f96ff | ||
|
|
b757d4b334 | ||
|
|
bd03d910fe | ||
|
|
01ef855157 | ||
|
|
817866caf3 | ||
|
|
158d65c6a7 | ||
|
|
62022c7de1 | ||
|
|
a824b5575d | ||
|
|
78819d5382 | ||
|
|
d128bc782a | ||
|
|
530b2a310f | ||
|
|
d5b0d99a54 | ||
|
|
43be72d076 | ||
|
|
9558944e22 | ||
|
|
0f6c866c8d | ||
|
|
bac78e9291 | ||
|
|
c22ea78672 | ||
|
|
a85afe827d | ||
|
|
abaed821ec | ||
|
|
6fa9dcd954 | ||
|
|
819d59cd79 | ||
|
|
2f88f0eedb | ||
|
|
74ff491671 | ||
|
|
eac48a6617 | ||
|
|
19617c14f8 | ||
|
|
fc7291c3e8 | ||
|
|
88db808298 | ||
|
|
5193abdab3 | ||
|
|
a315c9be92 | ||
|
|
fc1541591a | ||
|
|
ae97c4db9f | ||
|
|
26bc5973b5 | ||
|
|
e52b8c8423 | ||
|
|
7395489bac | ||
|
|
b384ed7f5c | ||
|
|
e3afcae7d3 | ||
|
|
9faeed7b20 | ||
|
|
49adcca80e | ||
|
|
49c43a6816 | ||
|
|
84f85ae098 | ||
|
|
3d581941ab | ||
|
|
d2d39baede | ||
|
|
111f5ba024 | ||
|
|
ce3fb7fa99 | ||
|
|
fc421d3f21 | ||
|
|
71bea759c6 | ||
|
|
bf1dd791a5 | ||
|
|
4c99577c08 | ||
|
|
5d5c63e6d4 | ||
|
|
42ff3f8432 | ||
|
|
be6ef76486 | ||
|
|
bc297e6d34 | ||
|
|
3a526dcbd7 | ||
|
|
7883352b74 | ||
|
|
982d122d18 | ||
|
|
d8d94407c6 |
No files matched your search
-1396
File diff suppressed because it is too large.
Load diff
@@ -1,4 +0,0 @@
|
||||
# Copyright 2021 Signal Messenger, LLC
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
custom: https://signal.org/donate/
|
||||
@@ -1,24 +0,0 @@
|
||||
name: Service CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 11
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: Build with Maven
|
||||
run: mvn -e -B verify
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
target
|
||||
local.properties
|
||||
.idea
|
||||
*.iml
|
||||
run.sh
|
||||
*~
|
||||
local.yml
|
||||
config/production.yml
|
||||
config/federated.yml
|
||||
config/staging.yml
|
||||
config/testing.yml
|
||||
config/deploy.properties
|
||||
/service/config/production.yml
|
||||
/service/config/federated.yml
|
||||
/service/config/staging.yml
|
||||
/service/config/testing.yml
|
||||
/service/config/deploy.properties
|
||||
/service/dependency-reduced-pom.xml
|
||||
.opsmanage
|
||||
put.sh
|
||||
deployer-staging.properties
|
||||
deployer-production.properties
|
||||
deployer.log
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,9 +0,0 @@
|
||||
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
|
||||
<extension>
|
||||
<groupId>fr.brouillard.oss</groupId>
|
||||
<artifactId>jgitver-maven-plugin</artifactId>
|
||||
<version>1.7.1</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
@@ -1,14 +0,0 @@
|
||||
<configuration xmlns="http://jgitver.github.io/maven/configuration/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://jgitver.github.io/maven/configuration/1.1.0 https://jgitver.github.io/maven/configuration/jgitver-configuration-v1_1_0.xsd">
|
||||
<useDirty>true</useDirty>
|
||||
<useDefaultBranchingPolicy>false</useDefaultBranchingPolicy>
|
||||
<branchPolicies>
|
||||
<branchPolicy>
|
||||
<pattern>(.*)</pattern>
|
||||
<transformations>
|
||||
<transformation>IGNORE</transformation>
|
||||
</transformations>
|
||||
</branchPolicy>
|
||||
</branchPolicies>
|
||||
</configuration>
|
||||
@@ -615,3 +615,47 @@ reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
@@ -1,26 +0,0 @@
|
||||
Signal-Server
|
||||
=================
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
Looking for protocol documentation? Check out the website!
|
||||
|
||||
https://signal.org/docs/
|
||||
|
||||
Cryptography Notice
|
||||
------------
|
||||
|
||||
This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software.
|
||||
BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted.
|
||||
See <http://www.wassenaar.org/> for more information.
|
||||
|
||||
The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms.
|
||||
The form and manner of this distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.
|
||||
|
||||
License
|
||||
---------------------
|
||||
|
||||
Copyright 2013-2021 Signal Messenger, LLC
|
||||
|
||||
Licensed under the AGPLv3: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
@@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>TextSecureServer</artifactId>
|
||||
<groupId>org.whispersystems.textsecure</groupId>
|
||||
<version>JGITVER</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>gcm-sender-async</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.github.resilience4j</groupId>
|
||||
<artifactId>resilience4j-retry</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-nop</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server;
|
||||
|
||||
|
||||
public class AuthenticationFailedException extends Exception {
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server;
|
||||
|
||||
|
||||
public class InvalidRequestException extends Exception {
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.whispersystems.gcm.server.internal.GcmRequestEntity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Message {
|
||||
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
private final String collapseKey;
|
||||
private final Long ttl;
|
||||
private final Boolean delayWhileIdle;
|
||||
private final Map<String, String> data;
|
||||
private final List<String> registrationIds;
|
||||
private final String priority;
|
||||
|
||||
private Message(String collapseKey, Long ttl, Boolean delayWhileIdle,
|
||||
Map<String, String> data, List<String> registrationIds,
|
||||
String priority)
|
||||
{
|
||||
this.collapseKey = collapseKey;
|
||||
this.ttl = ttl;
|
||||
this.delayWhileIdle = delayWhileIdle;
|
||||
this.data = data;
|
||||
this.registrationIds = registrationIds;
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public String serialize() throws JsonProcessingException {
|
||||
GcmRequestEntity requestEntity = new GcmRequestEntity(collapseKey, ttl, delayWhileIdle,
|
||||
data, registrationIds, priority);
|
||||
|
||||
return objectMapper.writeValueAsString(requestEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new Message using a Builder.
|
||||
* @return A new Builder.
|
||||
*/
|
||||
public static Builder newBuilder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private String collapseKey = null;
|
||||
private Long ttl = null;
|
||||
private Boolean delayWhileIdle = null;
|
||||
private Map<String, String> data = null;
|
||||
private List<String> registrationIds = new LinkedList<>();
|
||||
private String priority = null;
|
||||
|
||||
private Builder() {}
|
||||
|
||||
/**
|
||||
* @param collapseKey The GCM collapse key to use (optional).
|
||||
* @return The Builder.
|
||||
*/
|
||||
public Builder withCollapseKey(String collapseKey) {
|
||||
this.collapseKey = collapseKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param seconds The TTL (in seconds) for this message (optional).
|
||||
* @return The Builder.
|
||||
*/
|
||||
public Builder withTtl(long seconds) {
|
||||
this.ttl = seconds;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param delayWhileIdle Set GCM delay_while_idle (optional).
|
||||
* @return The Builder.
|
||||
*/
|
||||
public Builder withDelayWhileIdle(boolean delayWhileIdle) {
|
||||
this.delayWhileIdle = delayWhileIdle;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a key in the GCM JSON payload delivered to the application (optional).
|
||||
* @param key The key to set.
|
||||
* @param value The value to set.
|
||||
* @return The Builder.
|
||||
*/
|
||||
public Builder withDataPart(String key, String value) {
|
||||
if (data == null) {
|
||||
data = new HashMap<>();
|
||||
}
|
||||
data.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the destination GCM registration ID (mandatory).
|
||||
* @param registrationId The destination GCM registration ID.
|
||||
* @return The Builder.
|
||||
*/
|
||||
public Builder withDestination(String registrationId) {
|
||||
this.registrationIds.clear();
|
||||
this.registrationIds.add(registrationId);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the GCM message priority (optional).
|
||||
*
|
||||
* @param priority Valid values are "normal" and "high."
|
||||
* On iOS, these correspond to APNs priority 5 and 10.
|
||||
* @return The Builder.
|
||||
*/
|
||||
public Builder withPriority(String priority) {
|
||||
this.priority = priority;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a message object.
|
||||
*
|
||||
* @return An immutable message object, as configured by this builder.
|
||||
*/
|
||||
public Message build() {
|
||||
if (registrationIds.isEmpty()) {
|
||||
throw new IllegalArgumentException("You must specify a destination!");
|
||||
}
|
||||
|
||||
return new Message(collapseKey, ttl, delayWhileIdle, data, registrationIds, priority);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server;
|
||||
|
||||
/**
|
||||
* The result of a GCM send operation.
|
||||
*/
|
||||
public class Result {
|
||||
|
||||
private final String canonicalRegistrationId;
|
||||
private final String messageId;
|
||||
private final String error;
|
||||
|
||||
Result(String canonicalRegistrationId, String messageId, String error) {
|
||||
this.canonicalRegistrationId = canonicalRegistrationId;
|
||||
this.messageId = messageId;
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the "canonical" GCM registration ID for this destination.
|
||||
* See GCM documentation for details.
|
||||
* @return The canonical GCM registration ID.
|
||||
*/
|
||||
public String getCanonicalRegistrationId() {
|
||||
return canonicalRegistrationId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return If a "canonical" GCM registration ID is present in the response.
|
||||
*/
|
||||
public boolean hasCanonicalRegistrationId() {
|
||||
return canonicalRegistrationId != null && !canonicalRegistrationId.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The assigned GCM message ID, if successful.
|
||||
*/
|
||||
public String getMessageId() {
|
||||
return messageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The raw error string, if present.
|
||||
*/
|
||||
public String getError() {
|
||||
return error;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return If the send was a success.
|
||||
*/
|
||||
public boolean isSuccess() {
|
||||
return messageId != null && !messageId.isEmpty() && (error == null || error.isEmpty());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return If the destination GCM registration ID is no longer registered.
|
||||
*/
|
||||
public boolean isUnregistered() {
|
||||
return "NotRegistered".equals(error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return If messages to this device are being throttled.
|
||||
*/
|
||||
public boolean isThrottled() {
|
||||
return "DeviceMessageRateExceeded".equals(error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return If the destination GCM registration ID is invalid.
|
||||
*/
|
||||
public boolean isInvalidRegistrationId() {
|
||||
return "InvalidRegistration".equals(error);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import io.github.resilience4j.retry.IntervalFunction;
|
||||
import io.github.resilience4j.retry.Retry;
|
||||
import io.github.resilience4j.retry.RetryConfig;
|
||||
import org.whispersystems.gcm.server.internal.GcmResponseEntity;
|
||||
import org.whispersystems.gcm.server.internal.GcmResponseListEntity;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpResponse.BodyHandlers;
|
||||
import java.security.SecureRandom;
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CompletionException;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
/**
|
||||
* The main interface to sending GCM messages. Thread safe.
|
||||
*
|
||||
* @author Moxie Marlinspike
|
||||
*/
|
||||
public class Sender {
|
||||
|
||||
private static final String PRODUCTION_URL = "https://fcm.googleapis.com/fcm/send";
|
||||
|
||||
private final String authorizationHeader;
|
||||
private final URI uri;
|
||||
private final Retry retry;
|
||||
private final ObjectMapper mapper;
|
||||
private final ScheduledExecutorService executorService;
|
||||
|
||||
private final HttpClient[] clients = new HttpClient[10];
|
||||
private final SecureRandom random = new SecureRandom();
|
||||
|
||||
/**
|
||||
* Construct a Sender instance.
|
||||
*
|
||||
* @param apiKey Your application's GCM API key.
|
||||
*/
|
||||
public Sender(String apiKey, ObjectMapper mapper) {
|
||||
this(apiKey, mapper, 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a Sender instance with a specified retry count.
|
||||
*
|
||||
* @param apiKey Your application's GCM API key.
|
||||
* @param retryCount The number of retries to attempt on a network error or 500 response.
|
||||
*/
|
||||
public Sender(String apiKey, ObjectMapper mapper, int retryCount) {
|
||||
this(apiKey, mapper, retryCount, PRODUCTION_URL);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public Sender(String apiKey, ObjectMapper mapper, int retryCount, String url) {
|
||||
this.mapper = mapper;
|
||||
this.executorService = Executors.newSingleThreadScheduledExecutor();
|
||||
this.uri = URI.create(url);
|
||||
this.authorizationHeader = String.format("key=%s", apiKey);
|
||||
this.retry = Retry.of("fcm-sender", RetryConfig.custom()
|
||||
.maxAttempts(retryCount)
|
||||
.intervalFunction(IntervalFunction.ofExponentialRandomBackoff(Duration.ofMillis(100), 2.0))
|
||||
.retryOnException(this::isRetryableException)
|
||||
.build());
|
||||
|
||||
for (int i=0;i<clients.length;i++) {
|
||||
this.clients[i] = HttpClient.newBuilder()
|
||||
.version(HttpClient.Version.HTTP_2)
|
||||
.connectTimeout(Duration.ofSeconds(10))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isRetryableException(Throwable throwable) {
|
||||
while (throwable instanceof CompletionException) {
|
||||
throwable = throwable.getCause();
|
||||
}
|
||||
|
||||
return throwable instanceof ServerFailedException ||
|
||||
throwable instanceof TimeoutException ||
|
||||
throwable instanceof IOException;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asynchronously send a message.
|
||||
*
|
||||
* @param message The message to send.
|
||||
* @return A future.
|
||||
*/
|
||||
public CompletableFuture<Result> send(Message message) {
|
||||
try {
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(uri)
|
||||
.header("Authorization", authorizationHeader)
|
||||
.header("Content-Type", "application/json")
|
||||
.POST(HttpRequest.BodyPublishers.ofString(message.serialize()))
|
||||
.timeout(Duration.ofSeconds(10))
|
||||
.build();
|
||||
|
||||
return retry.executeCompletionStage(executorService,
|
||||
() -> getClient().sendAsync(request, BodyHandlers.ofByteArray())
|
||||
.thenApply(response -> {
|
||||
switch (response.statusCode()) {
|
||||
case 400: throw new CompletionException(new InvalidRequestException());
|
||||
case 401: throw new CompletionException(new AuthenticationFailedException());
|
||||
case 204:
|
||||
case 200: return response.body();
|
||||
default: throw new CompletionException(new ServerFailedException("Bad status: " + response.statusCode()));
|
||||
}
|
||||
})
|
||||
.thenApply(responseBytes -> {
|
||||
try {
|
||||
List<GcmResponseEntity> responseList = mapper.readValue(responseBytes, GcmResponseListEntity.class).getResults();
|
||||
|
||||
if (responseList == null || responseList.size() == 0) {
|
||||
throw new CompletionException(new IOException("Empty response list!"));
|
||||
}
|
||||
|
||||
GcmResponseEntity responseEntity = responseList.get(0);
|
||||
|
||||
return new Result(responseEntity.getCanonicalRegistrationId(),
|
||||
responseEntity.getMessageId(),
|
||||
responseEntity.getError());
|
||||
} catch (IOException e) {
|
||||
throw new CompletionException(e);
|
||||
}
|
||||
})).toCompletableFuture();
|
||||
} catch (JsonProcessingException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Retry getRetry() {
|
||||
return retry;
|
||||
}
|
||||
|
||||
private HttpClient getClient() {
|
||||
return clients[random.nextInt(clients.length)];
|
||||
}
|
||||
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server;
|
||||
|
||||
public class ServerFailedException extends Exception {
|
||||
public ServerFailedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public ServerFailedException(Exception e) {
|
||||
super(e);
|
||||
}
|
||||
}
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server.internal;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class GcmRequestEntity {
|
||||
|
||||
@JsonProperty(value = "collapse_key")
|
||||
private String collapseKey;
|
||||
|
||||
@JsonProperty(value = "time_to_live")
|
||||
private Long ttl;
|
||||
|
||||
@JsonProperty(value = "delay_while_idle")
|
||||
private Boolean delayWhileIdle;
|
||||
|
||||
@JsonProperty(value = "data")
|
||||
private Map<String, String> data;
|
||||
|
||||
@JsonProperty(value = "registration_ids")
|
||||
private List<String> registrationIds;
|
||||
|
||||
@JsonProperty
|
||||
private String priority;
|
||||
|
||||
public GcmRequestEntity(String collapseKey, Long ttl, Boolean delayWhileIdle,
|
||||
Map<String, String> data, List<String> registrationIds,
|
||||
String priority)
|
||||
{
|
||||
this.collapseKey = collapseKey;
|
||||
this.ttl = ttl;
|
||||
this.delayWhileIdle = delayWhileIdle;
|
||||
this.data = data;
|
||||
this.registrationIds = registrationIds;
|
||||
this.priority = priority;
|
||||
}
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server.internal;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class GcmResponseEntity {
|
||||
|
||||
@JsonProperty(value = "message_id")
|
||||
private String messageId;
|
||||
|
||||
@JsonProperty(value = "registration_id")
|
||||
private String canonicalRegistrationId;
|
||||
|
||||
@JsonProperty
|
||||
private String error;
|
||||
|
||||
public String getMessageId() {
|
||||
return messageId;
|
||||
}
|
||||
|
||||
public String getCanonicalRegistrationId() {
|
||||
return canonicalRegistrationId;
|
||||
}
|
||||
|
||||
public String getError() {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server.internal;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GcmResponseListEntity {
|
||||
|
||||
@JsonProperty
|
||||
private List<GcmResponseEntity> results;
|
||||
|
||||
public List<GcmResponseEntity> getResults() {
|
||||
return results;
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.whispersystems.gcm.server.util.JsonHelpers.jsonFixture;
|
||||
|
||||
public class MessageTest {
|
||||
|
||||
@Test
|
||||
public void testMinimal() throws IOException {
|
||||
Message message = Message.newBuilder()
|
||||
.withDestination("1")
|
||||
.build();
|
||||
|
||||
assertEquals(message.serialize(), jsonFixture("fixtures/message-minimal.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testComplete() throws IOException {
|
||||
Message message = Message.newBuilder()
|
||||
.withDestination("1")
|
||||
.withCollapseKey("collapse")
|
||||
.withDelayWhileIdle(true)
|
||||
.withTtl(10)
|
||||
.withPriority("high")
|
||||
.build();
|
||||
|
||||
assertEquals(message.serialize(), jsonFixture("fixtures/message-complete.json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithData() throws IOException {
|
||||
Message message = Message.newBuilder()
|
||||
.withDestination("2")
|
||||
.withDataPart("key1", "value1")
|
||||
.withDataPart("key2", "value2")
|
||||
.build();
|
||||
|
||||
assertEquals(message.serialize(), jsonFixture("fixtures/message-data.json"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,200 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server;
|
||||
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.any;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.anyRequestedFor;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.anyUrl;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.ok;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.verify;
|
||||
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.whispersystems.gcm.server.util.FixtureHelpers.fixture;
|
||||
import static org.whispersystems.gcm.server.util.JsonHelpers.jsonFixture;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.github.tomakehurst.wiremock.client.CountMatchingStrategy;
|
||||
import com.github.tomakehurst.wiremock.junit.WireMockRule;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SenderTest {
|
||||
|
||||
@Rule
|
||||
public WireMockRule wireMock = new WireMockRule(options().dynamicPort().dynamicHttpsPort());
|
||||
|
||||
private static final ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
static {
|
||||
mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE);
|
||||
mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess() throws InterruptedException, ExecutionException, TimeoutException, IOException {
|
||||
wireMock.stubFor(any(anyUrl())
|
||||
.willReturn(aResponse()
|
||||
.withStatus(200)
|
||||
.withBody(fixture("fixtures/response-success.json"))));
|
||||
|
||||
|
||||
Sender sender = new Sender("foobarbaz", mapper, 10, "http://localhost:" + wireMock.port() + "/gcm/send");
|
||||
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
|
||||
|
||||
Result result = future.get(10, TimeUnit.SECONDS);
|
||||
|
||||
assertTrue(result.isSuccess());
|
||||
assertFalse(result.isThrottled());
|
||||
assertFalse(result.isUnregistered());
|
||||
assertEquals(result.getMessageId(), "1:08");
|
||||
assertNull(result.getError());
|
||||
assertNull(result.getCanonicalRegistrationId());
|
||||
|
||||
verify(1, postRequestedFor(urlEqualTo("/gcm/send"))
|
||||
.withHeader("Authorization", equalTo("key=foobarbaz"))
|
||||
.withHeader("Content-Type", equalTo("application/json"))
|
||||
.withRequestBody(equalTo(jsonFixture("fixtures/message-minimal.json"))));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBadApiKey() throws InterruptedException, TimeoutException {
|
||||
wireMock.stubFor(any(anyUrl())
|
||||
.willReturn(aResponse()
|
||||
.withStatus(401)));
|
||||
|
||||
Sender sender = new Sender("foobar", mapper, 10, "http://localhost:" + wireMock.port() + "/gcm/send");
|
||||
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
|
||||
|
||||
try {
|
||||
future.get(10, TimeUnit.SECONDS);
|
||||
throw new AssertionError();
|
||||
} catch (ExecutionException ee) {
|
||||
assertTrue(ee.getCause() instanceof AuthenticationFailedException);
|
||||
}
|
||||
|
||||
verify(1, anyRequestedFor(anyUrl()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBadRequest() throws TimeoutException, InterruptedException {
|
||||
wireMock.stubFor(any(anyUrl())
|
||||
.willReturn(aResponse()
|
||||
.withStatus(400)));
|
||||
|
||||
Sender sender = new Sender("foobarbaz", mapper, 10, "http://localhost:" + wireMock.port() + "/gcm/send");
|
||||
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
|
||||
|
||||
try {
|
||||
future.get(10, TimeUnit.SECONDS);
|
||||
throw new AssertionError();
|
||||
} catch (ExecutionException e) {
|
||||
assertTrue(e.getCause() instanceof InvalidRequestException);
|
||||
}
|
||||
|
||||
verify(1, anyRequestedFor(anyUrl()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testServerError() throws TimeoutException, InterruptedException {
|
||||
wireMock.stubFor(any(anyUrl())
|
||||
.willReturn(aResponse()
|
||||
.withStatus(503)));
|
||||
|
||||
Sender sender = new Sender("foobarbaz", mapper, 3, "http://localhost:" + wireMock.port() + "/gcm/send");
|
||||
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
|
||||
|
||||
try {
|
||||
future.get(10, TimeUnit.SECONDS);
|
||||
throw new AssertionError();
|
||||
} catch (ExecutionException ee) {
|
||||
assertTrue(ee.getCause() instanceof ServerFailedException);
|
||||
}
|
||||
|
||||
verify(3, anyRequestedFor(anyUrl()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testServerErrorRecovery() throws InterruptedException, ExecutionException, TimeoutException {
|
||||
|
||||
wireMock.stubFor(any(anyUrl()).willReturn(aResponse().withStatus(503)));
|
||||
|
||||
Sender sender = new Sender("foobarbaz", mapper, 4, "http://localhost:" + wireMock.port() + "/gcm/send");
|
||||
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
|
||||
|
||||
// up to three failures can happen, with 100ms exponential backoff
|
||||
// if we end up using the fourth, and finaly try, it would be after ~700 ms
|
||||
CompletableFuture.delayedExecutor(300, TimeUnit.MILLISECONDS).execute(() ->
|
||||
wireMock.stubFor(any(anyUrl())
|
||||
.willReturn(aResponse()
|
||||
.withStatus(200)
|
||||
.withBody(fixture("fixtures/response-success.json"))))
|
||||
);
|
||||
|
||||
Result result = future.get(10, TimeUnit.SECONDS);
|
||||
|
||||
verify(new CountMatchingStrategy(CountMatchingStrategy.GREATER_THAN, 1), anyRequestedFor(anyUrl()));
|
||||
assertTrue(result.isSuccess());
|
||||
assertFalse(result.isThrottled());
|
||||
assertFalse(result.isUnregistered());
|
||||
assertEquals(result.getMessageId(), "1:08");
|
||||
assertNull(result.getError());
|
||||
assertNull(result.getCanonicalRegistrationId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNetworkError() throws TimeoutException, InterruptedException {
|
||||
|
||||
wireMock.stubFor(any(anyUrl())
|
||||
.willReturn(ok()));
|
||||
|
||||
Sender sender = new Sender("foobarbaz", mapper ,2, "http://localhost:" + wireMock.port() + "/gcm/send");
|
||||
|
||||
wireMock.stop();
|
||||
|
||||
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
|
||||
|
||||
try {
|
||||
future.get(10, TimeUnit.SECONDS);
|
||||
} catch (ExecutionException e) {
|
||||
assertTrue(e.getCause() instanceof IOException);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotRegistered() throws InterruptedException, ExecutionException, TimeoutException {
|
||||
|
||||
wireMock.stubFor(any(anyUrl()).willReturn(aResponse().withStatus(200)
|
||||
.withBody(fixture("fixtures/response-not-registered.json"))));
|
||||
|
||||
Sender sender = new Sender("foobarbaz", mapper,2, "http://localhost:" + wireMock.port() + "/gcm/send");
|
||||
CompletableFuture<Result> future = sender.send(Message.newBuilder()
|
||||
.withDestination("2")
|
||||
.withDataPart("message", "new message!")
|
||||
.build());
|
||||
|
||||
Result result = future.get(10, TimeUnit.SECONDS);
|
||||
|
||||
assertFalse(result.isSuccess());
|
||||
assertTrue(result.isUnregistered());
|
||||
assertFalse(result.isThrottled());
|
||||
assertEquals(result.getError(), "NotRegistered");
|
||||
}
|
||||
}
|
||||
-89
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server;
|
||||
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.post;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
|
||||
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
import static org.whispersystems.gcm.server.util.FixtureHelpers.fixture;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
|
||||
import com.github.tomakehurst.wiremock.junit.WireMockRule;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SimultaneousSenderTest {
|
||||
|
||||
@Rule
|
||||
public WireMockRule wireMock = new WireMockRule(WireMockConfiguration.options().dynamicPort().dynamicHttpsPort());
|
||||
|
||||
private static final ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
static {
|
||||
mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE);
|
||||
mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSimultaneousSuccess() throws TimeoutException, InterruptedException, ExecutionException, JsonProcessingException {
|
||||
stubFor(post(urlPathEqualTo("/gcm/send"))
|
||||
.willReturn(aResponse()
|
||||
.withStatus(200)
|
||||
.withBody(fixture("fixtures/response-success.json"))));
|
||||
|
||||
Sender sender = new Sender("foobarbaz", mapper, 2, "http://localhost:" + wireMock.port() + "/gcm/send");
|
||||
List<CompletableFuture<Result>> results = new LinkedList<>();
|
||||
|
||||
for (int i=0;i<1000;i++) {
|
||||
results.add(sender.send(Message.newBuilder().withDestination("1").build()));
|
||||
}
|
||||
|
||||
for (CompletableFuture<Result> future : results) {
|
||||
Result result = future.get(60, TimeUnit.SECONDS);
|
||||
|
||||
if (!result.isSuccess()) {
|
||||
throw new AssertionError(result.getError());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testSimultaneousFailure() throws TimeoutException, InterruptedException {
|
||||
stubFor(post(urlPathEqualTo("/gcm/send"))
|
||||
.willReturn(aResponse()
|
||||
.withStatus(503)));
|
||||
|
||||
Sender sender = new Sender("foobarbaz", mapper, 2, "http://localhost:" + wireMock.port() + "/gcm/send");
|
||||
List<CompletableFuture<Result>> futures = new LinkedList<>();
|
||||
|
||||
for (int i=0;i<1000;i++) {
|
||||
futures.add(sender.send(Message.newBuilder().withDestination("1").build()));
|
||||
}
|
||||
|
||||
for (CompletableFuture<Result> future : futures) {
|
||||
try {
|
||||
Result result = future.get(60, TimeUnit.SECONDS);
|
||||
} catch (ExecutionException e) {
|
||||
assertTrue(e.getCause().toString(), e.getCause() instanceof ServerFailedException);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server.util;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.io.Resources;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
/**
|
||||
* A set of helper method for fixture files.
|
||||
*/
|
||||
public class FixtureHelpers {
|
||||
private FixtureHelpers() { /* singleton */ }
|
||||
|
||||
/**
|
||||
* Reads the given fixture file from the classpath (e. g. {@code src/test/resources})
|
||||
* and returns its contents as a UTF-8 string.
|
||||
*
|
||||
* @param filename the filename of the fixture file
|
||||
* @return the contents of {@code src/test/resources/{filename}}
|
||||
* @throws IllegalArgumentException if an I/O error occurs.
|
||||
*/
|
||||
public static String fixture(String filename) {
|
||||
return fixture(filename, Charsets.UTF_8);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the given fixture file from the classpath (e. g. {@code src/test/resources})
|
||||
* and returns its contents as a string.
|
||||
*
|
||||
* @param filename the filename of the fixture file
|
||||
* @param charset the character set of {@code filename}
|
||||
* @return the contents of {@code src/test/resources/{filename}}
|
||||
* @throws IllegalArgumentException if an I/O error occurs.
|
||||
*/
|
||||
private static String fixture(String filename, Charset charset) {
|
||||
try {
|
||||
return Resources.toString(Resources.getResource(filename), charset).trim();
|
||||
} catch (IOException e) {
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.gcm.server.util;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.whispersystems.gcm.server.util.FixtureHelpers.fixture;
|
||||
|
||||
public class JsonHelpers {
|
||||
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
public static String asJson(Object object) throws JsonProcessingException {
|
||||
return objectMapper.writeValueAsString(object);
|
||||
}
|
||||
|
||||
public static <T> T fromJson(String value, Class<T> clazz) throws IOException {
|
||||
return objectMapper.readValue(value, clazz);
|
||||
}
|
||||
|
||||
public static String jsonFixture(String filename) throws IOException {
|
||||
return objectMapper.writeValueAsString(objectMapper.readValue(fixture(filename), JsonNode.class));
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"priority" : "high",
|
||||
"collapse_key" : "collapse",
|
||||
"time_to_live" : 10,
|
||||
"delay_while_idle" : true,
|
||||
"registration_ids" : ["1"]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"data" : {
|
||||
"key1" : "value1",
|
||||
"key2" : "value2"
|
||||
},
|
||||
"registration_ids" : ["2"]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"registration_ids" : ["1"]
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{ "multicast_id": 216,
|
||||
"success": 0,
|
||||
"failure": 1,
|
||||
"canonical_ids": 0,
|
||||
"results": [
|
||||
{ "error": "NotRegistered"}
|
||||
]
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{ "multicast_id": 108,
|
||||
"success": 1,
|
||||
"failure": 0,
|
||||
"canonical_ids": 0,
|
||||
"results": [
|
||||
{ "message_id": "1:08" }
|
||||
]
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<configuration>
|
||||
<!-- Turning down the wiremock logging -->
|
||||
<logger name="com.github.tomakehurst.wiremock" level="WARN"/>
|
||||
<logger name="wiremock.org" level="ERROR"/>
|
||||
<logger name="WireMock" level="WARN"/>
|
||||
<!-- wiremock has per endpoint servlet logging -->
|
||||
<logger name="/" level="WARN"/>
|
||||
</configuration>
|
||||
+291
@@ -0,0 +1,291 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="#packages">↓ Packages</a>
|
||||
</p>
|
||||
<div class="block content"><h1>Chat gRPC API</h1>
|
||||
<h2>Request metadata</h2>
|
||||
<p>Clients may provide headers for gRPC requests via <a href="https://grpc.io/docs/guides/metadata/">gRPC metadata</a> which translates directly to HTTP/2 headers.</p>
|
||||
<ul>
|
||||
<li>Clients should provide a <code>User-Agent</code> header on all gRPC requests. </li>
|
||||
<li>Clients may provide an <code>Accept-Language</code> on any gRPC requests.</li>
|
||||
</ul>
|
||||
<h2>Authentication</h2>
|
||||
<p>To authenticate for a specific signal account + device, clients may provide a <a href="https://www.rfc-editor.org/info/rfc7617/">Basic authorization header</a>
|
||||
on the request. The username must be the account identifier encoded in the 8-4-4-4-12 format followed by a '.'
|
||||
character and then the device id serialized as a string.</p>
|
||||
<p>All services either require or forbid providing authentication via an Authorization header. If the service is annotated
|
||||
with the <code>require.auth</code> option <code>AUTH_ONLY_AUTHENTICATED</code>, all requests to the service must contain valid authentication
|
||||
headers. If the service is annotated with the option <code>AUTH_ONLY_ANONYMOUS</code> the client must not provide an authorization
|
||||
header. If provided, the request will fail with a <code>BAD_AUTHENTICATION</code> error.</p>
|
||||
<h2>Errors</h2>
|
||||
<p>In the gRPC protocol all errors are at the request level. That is, errors are returned in response to individual requests and do not impact other H2 streams on the same connection nor terminate the connection.</p>
|
||||
<p>For errors that may be returned by any RPCs, the chat server will return the well-defined gRPC status codes returned as part of every RPC call. For errors that are specific to a particular RPC, the error must be encoded in the service proto definition and will be returned with a <code>Status</code> of <code>OK</code>.</p>
|
||||
<p>Status errors include additional metadata as described in <a href="https://google.aip.dev/193#error_model">AIP-193 (google's richer error model)</a>. Every <code>Status != OK</code> response returned by the chat server's application layer will include a <code>Grpc-Status-Details-Bin</code> response trailer with a <code>google.rpc.Status</code> proto.</p>
|
||||
<p>Each <code>google.rpc.Status</code> must have a status matching the top-level status on the gRPC response. Additionally, a single <code>ErrorInfo</code> must always be present in the details field of the <code>Status</code>. The <code>ErrorInfo</code> must contain a <code>domain</code> field and a <code>reason</code> field.</p>
|
||||
<p>The <code>domain</code> for a status error generated by the chat server will always be <code>grpc.chat.signal.org</code></p>
|
||||
<p>The server may set the <code>reason</code> to match the enum string for the <code>Status.Code</code> if there is no need to further distinguish a code. Clients should inspect the <code>reason</code>, not the <code>status</code>, for automated error handling.</p>
|
||||
<p>The chat server may return the following errors from any RPC</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: left;">Status Code</th>
|
||||
<th style="text-align: left;">Reason</th>
|
||||
<th style="text-align: left;">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;"><code>INVALID_ARGUMENT</code></td>
|
||||
<td style="text-align: left;"><code>UPGRADE_REQUIRED</code></td>
|
||||
<td style="text-align: left;">The client version provided in the <code>User-Agent</code> is no longer supported. The client must upgrade to use the service.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><code>INVALID_ARGUMENT</code></td>
|
||||
<td style="text-align: left;"><code>CONSTRAINT_VIOLATED</code></td>
|
||||
<td style="text-align: left;">The RPC argument violated a constraint that was annotated or documented in the service definition. It is always possible to check this constraint without communicating with the chat server. This always represents a client bug or out of date client. <br><br> The <code>details</code> may include a <a href="https://github.com/googleapis/googleapis/blob/8c06c1e04ae562f49f411357577c700e9142f33c/google/rpc/error_details.proto#L236"><code>BadRequest</code> message</a> that indicates additional information about the invalid field.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><code>INVALID_ARGUMENT</code></td>
|
||||
<td style="text-align: left;"><code>BAD_AUTHENTICATION</code></td>
|
||||
<td style="text-align: left;">The request has incorrectly set authentication credentials for the RPC. This represents a client bug where the authorization mode is not correct for the RPC. For example, <br><br> The RPC was for an anonymous service, but included an Authentication header in the RPC metadata. <br><br>The RPC should only be made by the primary device, but the request had linked device credentials.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><code>UNAUTHENTICATED</code></td>
|
||||
<td style="text-align: left;"><code>INVALID_CREDENTIALS</code></td>
|
||||
<td style="text-align: left;">The account credentials provided in the authorization header are not valid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><code>RESOURCE_EXHAUSTED</code></td>
|
||||
<td style="text-align: left;"><code>RESOURCE_EXHAUSTED</code></td>
|
||||
<td style="text-align: left;">A server-side resource was exhausted. The <code>details</code> field may include a <a href="https://github.com/googleapis/googleapis/blob/8c06c1e04ae562f49f411357577c700e9142f33c/google/rpc/error_details.proto#L92"><code>RetryInfo</code> message</a> that includes the amount of time in seconds the client should wait before retrying the request. <br><br> If a <code>RetryInfo</code> is present, the client must wait the indicated time before retrying the request. If absent, the client should retry with an exponential backoff.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><code>ABORTED</code></td>
|
||||
<td style="text-align: left;"><code>STREAM_CLOSED</code></td>
|
||||
<td style="text-align: left;">The server terminated a streaming RPC for some domain specific reason. The <code>details</code> field must include a message with additional information about why the stream was closed. This message must be defined in the corresponding service proto for the streaming RPC. This status must only be returned from server-side streaming RPCs. Clients must handle a STREAM_CLOSED status even if no corresponding message is defined in the version of the proto they are targeting. Unless otherwise noted, if a stream termination message is defined, clients must handle the error at any point in the message stream.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><code>UNAVAILABLE</code></td>
|
||||
<td style="text-align: left;"><code>UNAVAILABLE</code></td>
|
||||
<td style="text-align: left;">There was an internal error processing the RPC. The client should retry the request with exponential backoff.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Logging Errors</h3>
|
||||
<p>When logging error responses, clients may always log the status code, domain, and reason.</p>
|
||||
<p>For errors with domain <code>grpc.chat.signal.org</code> and reason <code>CONSTRAINT_VIOLATED</code>, clients should check the <code>details</code> field for a <code>BadRequest</code> proto. If present, they should log the <code>field</code> of each violation in <code>field_violations</code>.</p>
|
||||
<h3>GOAWAY</h3>
|
||||
<p>In a partial or total server outage, the server may start rejecting new connection requests or terminating existing connections with an HTTP/2 GOAWAY frame with code 0x40.</p>
|
||||
<p>If clients receive a 0x40 GOAWAY they should retry connections with an aggressive exponential backoff.</p></div>
|
||||
|
||||
<h3 id="packages" class="title is-3">
|
||||
Packages
|
||||
</h3>
|
||||
<div class="block">This site contains the documentation for the following Protobuf packages.</div>
|
||||
<div class="block">
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.account.html">org.signal.chat.account</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.attachments.html">org.signal.chat.attachments</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.backup.html">org.signal.chat.backup</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.calling.html">org.signal.chat.calling</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.calling.quality.html">org.signal.chat.calling.quality</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.challenge.html">org.signal.chat.challenge</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.common.html">org.signal.chat.common</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.credentials.html">org.signal.chat.credentials</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.device.html">org.signal.chat.device</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.donations.html">org.signal.chat.donations</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.errors.html">org.signal.chat.errors</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.keys.html">org.signal.chat.keys</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.messages.html">org.signal.chat.messages</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.payments.html">org.signal.chat.payments</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.profile.html">org.signal.chat.profile</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.purchase.html">org.signal.chat.purchase</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.remoteconfiguration.html">org.signal.chat.remoteconfiguration</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.require.html">org.signal.chat.require</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<h4 class="title is-5">
|
||||
|
||||
<a href="org.signal.chat.tag.html">org.signal.chat.tag</a>
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,487 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
|
||||
</p>
|
||||
<h3 class="title is-3">
|
||||
|
||||
Package <code>org.signal.chat.attachments</code>
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="block">
|
||||
|
||||
<p>
|
||||
<a href="#service-org.signal.chat.attachments.Attachments">
|
||||
<span class="tag" style="min-width: 6em">Service</span>
|
||||
<code>Attachments</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.attachments.GetStickerUploadFormRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetStickerUploadFormRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.attachments.GetStickerUploadFormResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetStickerUploadFormResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.attachments.GetUploadFormRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetUploadFormRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.attachments.GetUploadFormResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetUploadFormResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h3 class="title is-3">
|
||||
Services
|
||||
</h3>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="service-org.signal.chat.attachments.Attachments">
|
||||
<a href="#service-org.signal.chat.attachments.Attachments" title="org.signal.chat.attachments.Attachments">service Attachments</a>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p></p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.attachments.Attachments-GetUploadForm">
|
||||
<a href="#service-org.signal.chat.attachments.Attachments-GetUploadForm">
|
||||
rpc <code>GetUploadForm</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.attachments.html#message-org.signal.chat.attachments.GetUploadFormRequest"><span title="org.signal.chat.attachments.GetUploadFormRequest">org.signal.chat.attachments.GetUploadFormRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.attachments.html#message-org.signal.chat.attachments.GetUploadFormResponse"><span title="org.signal.chat.attachments.GetUploadFormResponse">org.signal.chat.attachments.GetUploadFormResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<p><p>Retrieve an upload form that can be used to perform a resumable upload</p></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.attachments.Attachments-GetStickerUploadForm">
|
||||
<a href="#service-org.signal.chat.attachments.Attachments-GetStickerUploadForm">
|
||||
rpc <code>GetStickerUploadForm</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.attachments.html#message-org.signal.chat.attachments.GetStickerUploadFormRequest"><span title="org.signal.chat.attachments.GetStickerUploadFormRequest">org.signal.chat.attachments.GetStickerUploadFormRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.attachments.html#message-org.signal.chat.attachments.GetStickerUploadFormResponse"><span title="org.signal.chat.attachments.GetStickerUploadFormResponse">org.signal.chat.attachments.GetStickerUploadFormResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<p><p>Retrieve an upload form that can be used to upload a sticker pack</p></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="title is-3">
|
||||
Messages
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.attachments.GetStickerUploadFormRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.attachments.GetStickerUploadFormRequest" title="org.signal.chat.attachments.GetStickerUploadFormRequest">message GetStickerUploadFormRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
sticker_count
|
||||
</td>
|
||||
<td>
|
||||
<code title="uint32">
|
||||
|
||||
<span>uint32</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The number of stickers in the sticker pack to upload</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.attachments.GetStickerUploadFormResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.attachments.GetStickerUploadFormResponse" title="org.signal.chat.attachments.GetStickerUploadFormResponse">message GetStickerUploadFormResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
pack_id
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A randomly-generated ID for the new sticker pack</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
manifest_upload_form
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.common.S3UploadForm">
|
||||
|
||||
<a href="org.signal.chat.common.html#message-org.signal.chat.common.S3UploadForm"><span title="org.signal.chat.common.S3UploadForm">org.signal.chat.common.S3UploadForm</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>An upload form clients must use to upload a manifest for the sticker pack</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>
|
||||
sticker_upload_forms
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.common.S3UploadForm">
|
||||
|
||||
repeated
|
||||
|
||||
<a href="org.signal.chat.common.html#message-org.signal.chat.common.S3UploadForm"><span title="org.signal.chat.common.S3UploadForm">org.signal.chat.common.S3UploadForm</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>Upload forms for individual stickers within the sticker pack</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.attachments.GetUploadFormRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.attachments.GetUploadFormRequest" title="org.signal.chat.attachments.GetUploadFormRequest">message GetUploadFormRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
uploadLength
|
||||
</td>
|
||||
<td>
|
||||
<code title="uint64">
|
||||
|
||||
<span>uint64</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The length of the attachment for the requested upload form. Uploads
|
||||
performed with this form will be limited to the provided length.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.attachments.GetUploadFormResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.attachments.GetUploadFormResponse" title="org.signal.chat.attachments.GetUploadFormResponse">message GetUploadFormResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr class="nohover"><td style="border: 0px"></td></tr>
|
||||
<tr class="nohover">
|
||||
<td class="oneof-heading" colspan="4">
|
||||
<div class="oneof-heading">
|
||||
<strong>oneof outcome</strong>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
1
|
||||
</td>
|
||||
<td>
|
||||
upload_form
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.common.UploadForm">
|
||||
|
||||
<a href="org.signal.chat.common.html#message-org.signal.chat.common.UploadForm"><span title="org.signal.chat.common.UploadForm">org.signal.chat.common.UploadForm</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
2
|
||||
</td>
|
||||
<td>
|
||||
exceeds_max_upload_length
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.errors.FailedPrecondition">
|
||||
|
||||
<a href="org.signal.chat.errors.html#message-org.signal.chat.errors.FailedPrecondition"><span title="org.signal.chat.errors.FailedPrecondition">org.signal.chat.errors.FailedPrecondition</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The request size was larger than the maximum supported upload size. The
|
||||
maximum upload size is subject to change and is governed by
|
||||
<code>global.attachments.maxBytes</code></p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,544 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
|
||||
</p>
|
||||
<h3 class="title is-3">
|
||||
|
||||
Package <code>org.signal.chat.calling</code>
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="block">
|
||||
|
||||
<p>
|
||||
<a href="#service-org.signal.chat.calling.Calling">
|
||||
<span class="tag" style="min-width: 6em">Service</span>
|
||||
<code>Calling</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.calling.GetCallingRelaysRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetCallingRelaysRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetCallingRelaysResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>HostnameUrlList</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>IpUrlList</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.Relay">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>Relay</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h3 class="title is-3">
|
||||
Services
|
||||
</h3>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="service-org.signal.chat.calling.Calling">
|
||||
<a href="#service-org.signal.chat.calling.Calling" title="org.signal.chat.calling.Calling">service Calling</a>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p><p>Provides methods for getting credentials and relay options for one-on-one
|
||||
calls.</p></p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.calling.Calling-GetCallingRelays">
|
||||
<a href="#service-org.signal.chat.calling.Calling-GetCallingRelays">
|
||||
rpc <code>GetCallingRelays</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysRequest"><span title="org.signal.chat.calling.GetCallingRelaysRequest">org.signal.chat.calling.GetCallingRelaysRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse"><span title="org.signal.chat.calling.GetCallingRelaysResponse">org.signal.chat.calling.GetCallingRelaysResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<p><p>Retrieves TURN credentials and relay options for one-on-one calls.</p></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="title is-3">
|
||||
Messages
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.GetCallingRelaysRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.calling.GetCallingRelaysRequest" title="org.signal.chat.calling.GetCallingRelaysRequest">message GetCallingRelaysRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.GetCallingRelaysResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse" title="org.signal.chat.calling.GetCallingRelaysResponse">message GetCallingRelaysResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
relays
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.calling.GetCallingRelaysResponse.Relay">
|
||||
|
||||
repeated
|
||||
|
||||
<a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse.Relay"><span title="org.signal.chat.calling.GetCallingRelaysResponse.Relay">org.signal.chat.calling.GetCallingRelaysResponse.Relay</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A collection of calling relays a client may use for one-on-one calls.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList" title="org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList">message HostnameUrlList</a>
|
||||
|
||||
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse"><span title="org.signal.chat.calling.GetCallingRelaysResponse">org.signal.chat.calling.GetCallingRelaysResponse</span>
|
||||
</a>)</span>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
urls
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
repeated
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A collection of hostname-based TURN, TURNS, or STUN URLs a client can use
|
||||
to connect to a relay.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList" title="org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList">message IpUrlList</a>
|
||||
|
||||
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse"><span title="org.signal.chat.calling.GetCallingRelaysResponse">org.signal.chat.calling.GetCallingRelaysResponse</span>
|
||||
</a>)</span>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
urls
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
repeated
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A collection of IP-based TURN, TURNS, or STUN URLs a client can use to
|
||||
connect to a relay.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
hostname
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
optional
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A hostname clients must use to validate the relay's TLS certificate when
|
||||
connecting via an IP-based TURNS URL. May not be specified if <code>urls</code>
|
||||
contains no TURNS URLs.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.GetCallingRelaysResponse.Relay">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.Relay" title="org.signal.chat.calling.GetCallingRelaysResponse.Relay">message Relay</a>
|
||||
|
||||
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse"><span title="org.signal.chat.calling.GetCallingRelaysResponse">org.signal.chat.calling.GetCallingRelaysResponse</span>
|
||||
</a>)</span>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
username
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A username that can be presented to authenticate with a TURN server.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
password
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A password that can be presented to authenticate with a TURN server.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>
|
||||
credential_ttl_seconds
|
||||
</td>
|
||||
<td>
|
||||
<code title="uint64">
|
||||
|
||||
<span>uint64</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The duration, in seconds, after which the included username and password
|
||||
will no longer be valid.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>
|
||||
hostname_urls
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList">
|
||||
|
||||
optional
|
||||
|
||||
<a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList"><span title="org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList">org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A collection of hostname-based URLs clients may use to connect to this
|
||||
relay.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>5</td>
|
||||
<td>
|
||||
ip_urls
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList">
|
||||
|
||||
optional
|
||||
|
||||
<a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList"><span title="org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList">org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A collection of IP-based URLs clients may use to connect to this relay.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,635 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
|
||||
</p>
|
||||
<h3 class="title is-3">
|
||||
|
||||
Package <code>org.signal.chat.calling.quality</code>
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="block">
|
||||
|
||||
<p>
|
||||
<a href="#service-org.signal.chat.calling.quality.CallQuality">
|
||||
<span class="tag" style="min-width: 6em">Service</span>
|
||||
<code>CallQuality</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>SubmitCallQualitySurveyRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>SubmitCallQualitySurveyResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h3 class="title is-3">
|
||||
Services
|
||||
</h3>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="service-org.signal.chat.calling.quality.CallQuality">
|
||||
<a href="#service-org.signal.chat.calling.quality.CallQuality" title="org.signal.chat.calling.quality.CallQuality">service CallQuality</a>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p><p>Provides methods for submitting call quality surveys</p></p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.calling.quality.CallQuality-SubmitCallQualitySurvey">
|
||||
<a href="#service-org.signal.chat.calling.quality.CallQuality-SubmitCallQualitySurvey">
|
||||
rpc <code>SubmitCallQualitySurvey</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.calling.quality.html#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest"><span title="org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest">org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.calling.quality.html#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse"><span title="org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse">org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<p><p>Submits a call quality survey response.</p></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="title is-3">
|
||||
Messages
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest" title="org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest">message SubmitCallQualitySurveyRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
user_satisfied
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>Indicates whether the caller was generally satisfied with the quality of
|
||||
the call</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
call_quality_issues
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
repeated
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A list of call quality issues selected by the caller</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>
|
||||
additional_issues_description
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
optional
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A free-form description of any additional issues as written by the caller</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>
|
||||
debug_log_url
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
optional
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A URL for a set of debug logs associated with the call if the caller chose
|
||||
to submit debug logs</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>5</td>
|
||||
<td>
|
||||
start_timestamp
|
||||
</td>
|
||||
<td>
|
||||
<code title="int64">
|
||||
|
||||
<span>int64</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The time at which the call started in milliseconds since the epoch</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>6</td>
|
||||
<td>
|
||||
end_timestamp
|
||||
</td>
|
||||
<td>
|
||||
<code title="int64">
|
||||
|
||||
<span>int64</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The time at which the call ended in milliseconds since the epoch</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>7</td>
|
||||
<td>
|
||||
call_type
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The type of call; note that direct voice calls can become video calls and
|
||||
vice versa, and this field indicates which mode was selected at call
|
||||
initiation time. At the time of writing, expected call types are
|
||||
"direct_voice", "direct_video", "group", and "call_link".</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>8</td>
|
||||
<td>
|
||||
success
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>Indicates whether the call completed without error or if it terminated
|
||||
abnormally</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>9</td>
|
||||
<td>
|
||||
call_end_reason
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A client-defined, but human-readable reason for call termination</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>
|
||||
connection_rtt_median
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The median round-trip time, measured in milliseconds, for STUN/ICE packets
|
||||
(i.e. connection maintenance and establishment)</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>11</td>
|
||||
<td>
|
||||
audio_rtt_median
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The median round-trip time, measured in milliseconds, for RTP/RTCP packets
|
||||
for audio streams</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>12</td>
|
||||
<td>
|
||||
video_rtt_median
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The median round-trip time, measured in milliseconds, for RTP/RTCP packets
|
||||
for video streams</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>13</td>
|
||||
<td>
|
||||
audio_recv_jitter_median
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The median jitter for audio streams, measured in milliseconds, for the
|
||||
duration of the call as measured by the client submitting the survey</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>14</td>
|
||||
<td>
|
||||
video_recv_jitter_median
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The median jitter for video streams, measured in milliseconds, for the
|
||||
duration of the call as measured by the client submitting the survey</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>15</td>
|
||||
<td>
|
||||
audio_send_jitter_median
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The median jitter for audio streams, measured in milliseconds, for the
|
||||
duration of the call as measured by the remote endpoint in the call (either
|
||||
the peer of the client submitting the survey in a direct call or the SFU in
|
||||
a group call)</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>16</td>
|
||||
<td>
|
||||
video_send_jitter_median
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The median jitter for video streams, measured in milliseconds, for the
|
||||
duration of the call as measured by the remote endpoint in the call (either
|
||||
the peer of the client submitting the survey in a direct call or the SFU in
|
||||
a group call)</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>17</td>
|
||||
<td>
|
||||
audio_recv_packet_loss_fraction
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The fraction of audio packets lost over the duration of the call as
|
||||
measured by the client submitting the survey</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>18</td>
|
||||
<td>
|
||||
video_recv_packet_loss_fraction
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The fraction of video packets lost over the duration of the call as
|
||||
measured by the client submitting the survey</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>19</td>
|
||||
<td>
|
||||
audio_send_packet_loss_fraction
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The fraction of audio packets lost over the duration of the call as
|
||||
measured by the remote endpoint in the call (either the peer of the client
|
||||
submitting the survey in a direct call or the SFU in a group call)</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>
|
||||
video_send_packet_loss_fraction
|
||||
</td>
|
||||
<td>
|
||||
<code title="float">
|
||||
|
||||
optional
|
||||
|
||||
<span>float</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The fraction of video packets lost over the duration of the call as
|
||||
measured by the remote endpoint in the call (either the peer of the client
|
||||
submitting the survey in a direct call or the SFU in a group call)</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>21</td>
|
||||
<td>
|
||||
call_telemetry
|
||||
</td>
|
||||
<td>
|
||||
<code title="bytes">
|
||||
|
||||
optional
|
||||
|
||||
<span>bytes</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>Machine-generated telemetry from the call; this is a serialized protobuf
|
||||
entity generated (and, critically, explained to the user!) by the calling
|
||||
library</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>22</td>
|
||||
<td>
|
||||
call_id_hash
|
||||
</td>
|
||||
<td>
|
||||
<code title="bytes">
|
||||
|
||||
optional
|
||||
|
||||
<span>bytes</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A hash of a call ID (shared between clients and never sent to the calling
|
||||
server) that can be used to correlate survey responses from multiple
|
||||
participants in a call</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse" title="org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse">message SubmitCallQualitySurveyResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,679 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
|
||||
</p>
|
||||
<h3 class="title is-3">
|
||||
|
||||
Package <code>org.signal.chat.challenge</code>
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="block">
|
||||
|
||||
<p>
|
||||
<a href="#service-org.signal.chat.challenge.Challenge">
|
||||
<span class="tag" style="min-width: 6em">Service</span>
|
||||
<code>Challenge</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>AnswerCaptchaChallengeRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>AnswerChallengeRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.challenge.AnswerChallengeResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>AnswerChallengeResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>AnswerPushChallengeRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.challenge.RequestPushChallengeRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>RequestPushChallengeRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.challenge.RequestPushChallengeResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>RequestPushChallengeResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.challenge.RequestPushChallengeResponse.SentPushChallenge">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>SentPushChallenge</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h3 class="title is-3">
|
||||
Services
|
||||
</h3>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="service-org.signal.chat.challenge.Challenge">
|
||||
<a href="#service-org.signal.chat.challenge.Challenge" title="org.signal.chat.challenge.Challenge">service Challenge</a>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p></p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.challenge.Challenge-AnswerChallenge">
|
||||
<a href="#service-org.signal.chat.challenge.Challenge-AnswerChallenge">
|
||||
rpc <code>AnswerChallenge</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeRequest"><span title="org.signal.chat.challenge.AnswerChallengeRequest">org.signal.chat.challenge.AnswerChallengeRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeResponse"><span title="org.signal.chat.challenge.AnswerChallengeResponse">org.signal.chat.challenge.AnswerChallengeResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<p><p>Submit proof of a challenge completion.</p>
|
||||
<p>Some server endpoints (the "send message" endpoint, for example) may return
|
||||
a response indicating the client must complete a challenge before continuing.
|
||||
Clients may use this endpoint to provide proof of a completed challenge.
|
||||
If successful, the client may then continue their original operation.</p></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.challenge.Challenge-RequestPushChallenge">
|
||||
<a href="#service-org.signal.chat.challenge.Challenge-RequestPushChallenge">
|
||||
rpc <code>RequestPushChallenge</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.RequestPushChallengeRequest"><span title="org.signal.chat.challenge.RequestPushChallengeRequest">org.signal.chat.challenge.RequestPushChallengeRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.RequestPushChallengeResponse"><span title="org.signal.chat.challenge.RequestPushChallengeResponse">org.signal.chat.challenge.RequestPushChallengeResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<p><p>Requests that a challenge value be sent to the authenticated account's
|
||||
primary device via push notification. Once received, callers may present
|
||||
the challenge value via the HandleChallengeResponse RPC.</p>
|
||||
<p>APNs challenge payloads will be formatted as follows:</p>
|
||||
<pre><code>{
|
||||
"aps": {
|
||||
"sound": "default",
|
||||
"alert": {
|
||||
"loc-key": "APN_Message"
|
||||
}
|
||||
},
|
||||
"rateLimitChallenge": "{CHALLENGE_TOKEN}"
|
||||
}
|
||||
</code></pre>
|
||||
<p>FCM challenge payloads will be formatted as follows:</p>
|
||||
<pre><code>{"rateLimitChallenge": "{CHALLENGE_TOKEN}"}
|
||||
</code></pre></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="title is-3">
|
||||
Messages
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest" title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest">message AnswerCaptchaChallengeRequest</a>
|
||||
|
||||
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeRequest"><span title="org.signal.chat.challenge.AnswerChallengeRequest">org.signal.chat.challenge.AnswerChallengeRequest</span>
|
||||
</a>)</span>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
captcha
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A string representing a solved captcha
|
||||
Example: signal-hcaptcha.30b01b46-d8c9-4c30-bbd7-9719acfe0c10.challenge.abcdefg1345</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.AnswerChallengeRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest" title="org.signal.chat.challenge.AnswerChallengeRequest">message AnswerChallengeRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
token
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The opaque token id from the ChallengeRequired response returned by the
|
||||
server endpoint that requested the challenge</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr class="nohover"><td style="border: 0px"></td></tr>
|
||||
<tr class="nohover">
|
||||
<td class="oneof-heading" colspan="4">
|
||||
<div class="oneof-heading">
|
||||
<strong>oneof request</strong>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
2
|
||||
</td>
|
||||
<td>
|
||||
push
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest">
|
||||
|
||||
<a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest"><span title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest">org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
captcha
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest">
|
||||
|
||||
<a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest"><span title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest">org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.AnswerChallengeResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.challenge.AnswerChallengeResponse" title="org.signal.chat.challenge.AnswerChallengeResponse">message AnswerChallengeResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
success
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>Whether the challenge proof was accepted</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest" title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest">message AnswerPushChallengeRequest</a>
|
||||
|
||||
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeRequest"><span title="org.signal.chat.challenge.AnswerChallengeRequest">org.signal.chat.challenge.AnswerChallengeRequest</span>
|
||||
</a>)</span>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
challenge
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The challenge string provided to the client via a push payload</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.RequestPushChallengeRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.challenge.RequestPushChallengeRequest" title="org.signal.chat.challenge.RequestPushChallengeRequest">message RequestPushChallengeRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.RequestPushChallengeResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.challenge.RequestPushChallengeResponse" title="org.signal.chat.challenge.RequestPushChallengeResponse">message RequestPushChallengeResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr class="nohover"><td style="border: 0px"></td></tr>
|
||||
<tr class="nohover">
|
||||
<td class="oneof-heading" colspan="4">
|
||||
<div class="oneof-heading">
|
||||
<strong>oneof response</strong>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
1
|
||||
</td>
|
||||
<td>
|
||||
sent_push_challenge
|
||||
</td>
|
||||
<td>
|
||||
<code title="google.protobuf.Empty">
|
||||
|
||||
<span>google.protobuf.Empty</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The server attempted to send a challenge value to the authenticated
|
||||
account's primary device via a push notification.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
2
|
||||
</td>
|
||||
<td>
|
||||
no_push_token
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.errors.FailedPrecondition">
|
||||
|
||||
<a href="org.signal.chat.errors.html#message-org.signal.chat.errors.FailedPrecondition"><span title="org.signal.chat.errors.FailedPrecondition">org.signal.chat.errors.FailedPrecondition</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The authenticated account's primary device does not have a push token.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.RequestPushChallengeResponse.SentPushChallenge">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.challenge.RequestPushChallengeResponse.SentPushChallenge" title="org.signal.chat.challenge.RequestPushChallengeResponse.SentPushChallenge">message SentPushChallenge</a>
|
||||
|
||||
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.RequestPushChallengeResponse"><span title="org.signal.chat.challenge.RequestPushChallengeResponse">org.signal.chat.challenge.RequestPushChallengeResponse</span>
|
||||
</a>)</span>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,503 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
|
||||
</p>
|
||||
<h3 class="title is-3">
|
||||
|
||||
Package <code>org.signal.chat.donations</code>
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="block">
|
||||
|
||||
<p>
|
||||
<a href="#service-org.signal.chat.donations.Donations">
|
||||
<span class="tag" style="min-width: 6em">Service</span>
|
||||
<code>Donations</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.donations.CreateDonationPermitsRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>CreateDonationPermitsRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.donations.CreateDonationPermitsResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>CreateDonationPermitsResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.donations.RedeemReceiptRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>RedeemReceiptRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.donations.RedeemReceiptResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>RedeemReceiptResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h3 class="title is-3">
|
||||
Services
|
||||
</h3>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="service-org.signal.chat.donations.Donations">
|
||||
<a href="#service-org.signal.chat.donations.Donations" title="org.signal.chat.donations.Donations">service Donations</a>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p></p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.donations.Donations-RedeemReceipt">
|
||||
<a href="#service-org.signal.chat.donations.Donations-RedeemReceipt">
|
||||
rpc <code>RedeemReceipt</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.donations.html#message-org.signal.chat.donations.RedeemReceiptRequest"><span title="org.signal.chat.donations.RedeemReceiptRequest">org.signal.chat.donations.RedeemReceiptRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.donations.html#message-org.signal.chat.donations.RedeemReceiptResponse"><span title="org.signal.chat.donations.RedeemReceiptResponse">org.signal.chat.donations.RedeemReceiptResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<p><p>Redeem a receipt acquired from Subscriptions.GetReceiptCredential
|
||||
to add a badge to the account. After successful redemption, profile
|
||||
responses will include the corresponding badge (if configured as visible)
|
||||
until the expiration time on the receipt.</p></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.donations.Donations-CreateDonationPermits">
|
||||
<a href="#service-org.signal.chat.donations.Donations-CreateDonationPermits">
|
||||
rpc <code>CreateDonationPermits</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.donations.html#message-org.signal.chat.donations.CreateDonationPermitsRequest"><span title="org.signal.chat.donations.CreateDonationPermitsRequest">org.signal.chat.donations.CreateDonationPermitsRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.donations.html#message-org.signal.chat.donations.CreateDonationPermitsResponse"><span title="org.signal.chat.donations.CreateDonationPermitsResponse">org.signal.chat.donations.CreateDonationPermitsResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<p><p>Generate a set of anonymous, single-use, permits for use with /v1/subscription endpoints.</p>
|
||||
<p>If rate limited, reduce requested permit count and/or try again after the prescribed delay.</p></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="title is-3">
|
||||
Messages
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.donations.CreateDonationPermitsRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.donations.CreateDonationPermitsRequest" title="org.signal.chat.donations.CreateDonationPermitsRequest">message CreateDonationPermitsRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
donation_permits_request
|
||||
</td>
|
||||
<td>
|
||||
<code title="bytes">
|
||||
|
||||
<span>bytes</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>a serialized libsignal DonationPermitsRequest</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.donations.CreateDonationPermitsResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.donations.CreateDonationPermitsResponse" title="org.signal.chat.donations.CreateDonationPermitsResponse">message CreateDonationPermitsResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
donation_permits_response
|
||||
</td>
|
||||
<td>
|
||||
<code title="bytes">
|
||||
|
||||
<span>bytes</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>a serialized libsignal DonationPermitsResponse</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.donations.RedeemReceiptRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.donations.RedeemReceiptRequest" title="org.signal.chat.donations.RedeemReceiptRequest">message RedeemReceiptRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
receiptCredentialPresentation
|
||||
</td>
|
||||
<td>
|
||||
<code title="bytes">
|
||||
|
||||
<span>bytes</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>Presentation of the ZK receipt acquired when the subscription was created</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
visible
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>If true, the corresponding badge should be visible on the profile</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>
|
||||
primary
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>If true, and the new badge is visible, it should be the primary badge on the profile</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.donations.RedeemReceiptResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.donations.RedeemReceiptResponse" title="org.signal.chat.donations.RedeemReceiptResponse">message RedeemReceiptResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr class="nohover"><td style="border: 0px"></td></tr>
|
||||
<tr class="nohover">
|
||||
<td class="oneof-heading" colspan="4">
|
||||
<div class="oneof-heading">
|
||||
<strong>oneof response</strong>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
1
|
||||
</td>
|
||||
<td>
|
||||
success
|
||||
</td>
|
||||
<td>
|
||||
<code title="google.protobuf.Empty">
|
||||
|
||||
<span>google.protobuf.Empty</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The receipt was successfully redeemed</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
2
|
||||
</td>
|
||||
<td>
|
||||
failed_authentication
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.errors.FailedZkAuthentication">
|
||||
|
||||
<a href="org.signal.chat.errors.html#message-org.signal.chat.errors.FailedZkAuthentication"><span title="org.signal.chat.errors.FailedZkAuthentication">org.signal.chat.errors.FailedZkAuthentication</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The provided presentation is invalid</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
already_redeemed
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.errors.FailedPrecondition">
|
||||
|
||||
<a href="org.signal.chat.errors.html#message-org.signal.chat.errors.FailedPrecondition"><span title="org.signal.chat.errors.FailedPrecondition">org.signal.chat.errors.FailedPrecondition</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The receipt was already redeemed for a different account</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,330 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
|
||||
</p>
|
||||
<h3 class="title is-3">
|
||||
|
||||
Package <code>org.signal.chat.errors</code>
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.errors.FailedPrecondition">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>FailedPrecondition</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.errors.FailedUnidentifiedAuthorization">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>FailedUnidentifiedAuthorization</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.errors.FailedZkAuthentication">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>FailedZkAuthentication</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.errors.NotFound">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>NotFound</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="title is-3">
|
||||
Messages
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.errors.FailedPrecondition">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.errors.FailedPrecondition" title="org.signal.chat.errors.FailedPrecondition">message FailedPrecondition</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p>Response message that indicates that some precondition of the request was not
|
||||
met. For example, if there was a request to update foo, but foo had not been
|
||||
set, this would be an appropriate error.</p>
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
description
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>An optional description indicating what precondition failed.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.errors.FailedUnidentifiedAuthorization">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.errors.FailedUnidentifiedAuthorization" title="org.signal.chat.errors.FailedUnidentifiedAuthorization">message FailedUnidentifiedAuthorization</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p>Response message that indicates authorization to perform an unidentified
|
||||
operation via an endorsement or access key failed</p>
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
description
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>An optional description with additional information about the failure.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.errors.FailedZkAuthentication">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.errors.FailedZkAuthentication" title="org.signal.chat.errors.FailedZkAuthentication">message FailedZkAuthentication</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p>Response message that authentication via an anonymous credential failed.</p>
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
description
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>An optional description with additional information about the failure.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.errors.NotFound">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.errors.NotFound" title="org.signal.chat.errors.NotFound">message NotFound</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p>Response message that indicates a particular resource was not found.</p>
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,356 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
|
||||
</p>
|
||||
<h3 class="title is-3">
|
||||
|
||||
Package <code>org.signal.chat.payments</code>
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="block">
|
||||
|
||||
<p>
|
||||
<a href="#service-org.signal.chat.payments.Payments">
|
||||
<span class="tag" style="min-width: 6em">Service</span>
|
||||
<code>Payments</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>CurrencyConversionEntity</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetCurrencyConversionsRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetCurrencyConversionsResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h3 class="title is-3">
|
||||
Services
|
||||
</h3>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="service-org.signal.chat.payments.Payments">
|
||||
<a href="#service-org.signal.chat.payments.Payments" title="org.signal.chat.payments.Payments">service Payments</a>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p><p>Provides methods for working with payments.</p></p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.payments.Payments-GetCurrencyConversions">
|
||||
<a href="#service-org.signal.chat.payments.Payments-GetCurrencyConversions">
|
||||
rpc <code>GetCurrencyConversions</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.payments.html#message-org.signal.chat.payments.GetCurrencyConversionsRequest"><span title="org.signal.chat.payments.GetCurrencyConversionsRequest">org.signal.chat.payments.GetCurrencyConversionsRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.payments.html#message-org.signal.chat.payments.GetCurrencyConversionsResponse"><span title="org.signal.chat.payments.GetCurrencyConversionsResponse">org.signal.chat.payments.GetCurrencyConversionsResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="title is-3">
|
||||
Messages
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity" title="org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity">message CurrencyConversionEntity</a>
|
||||
|
||||
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.payments.html#message-org.signal.chat.payments.GetCurrencyConversionsResponse"><span title="org.signal.chat.payments.GetCurrencyConversionsResponse">org.signal.chat.payments.GetCurrencyConversionsResponse</span>
|
||||
</a>)</span>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
base
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
conversions
|
||||
</td>
|
||||
<td>
|
||||
<code title="map<string, string>">
|
||||
|
||||
<span>map<string, string></span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.payments.GetCurrencyConversionsRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsRequest" title="org.signal.chat.payments.GetCurrencyConversionsRequest">message GetCurrencyConversionsRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.payments.GetCurrencyConversionsResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsResponse" title="org.signal.chat.payments.GetCurrencyConversionsResponse">message GetCurrencyConversionsResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
timestamp
|
||||
</td>
|
||||
<td>
|
||||
<code title="uint64">
|
||||
|
||||
<span>uint64</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
currencies
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity">
|
||||
|
||||
repeated
|
||||
|
||||
<a href="org.signal.chat.payments.html#message-org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity"><span title="org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity">org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,775 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
|
||||
</p>
|
||||
<h3 class="title is-3">
|
||||
|
||||
Package <code>org.signal.chat.remoteconfiguration</code>
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="block">
|
||||
|
||||
<p>
|
||||
<a href="#service-org.signal.chat.remoteconfiguration.RemoteConfiguration">
|
||||
<span class="tag" style="min-width: 6em">Service</span>
|
||||
<code>RemoteConfiguration</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.Badges">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>Badges</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.Configuration">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>Configuration</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.GetBadgesRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetBadgesRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.GetBadgesResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetBadgesResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.GetConfigurationRequest">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetConfigurationRequest</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.GetConfigurationResponse">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>GetConfigurationResponse</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.TaggedBadges">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>TaggedBadges</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.TaggedConfiguration">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>TaggedConfiguration</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h3 class="title is-3">
|
||||
Services
|
||||
</h3>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="service-org.signal.chat.remoteconfiguration.RemoteConfiguration">
|
||||
<a href="#service-org.signal.chat.remoteconfiguration.RemoteConfiguration" title="org.signal.chat.remoteconfiguration.RemoteConfiguration">service RemoteConfiguration</a>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p><p>Provides remote configuration applicable to the authenticated user</p></p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.remoteconfiguration.RemoteConfiguration-GetConfiguration">
|
||||
<a href="#service-org.signal.chat.remoteconfiguration.RemoteConfiguration-GetConfiguration">
|
||||
rpc <code>GetConfiguration</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.GetConfigurationRequest"><span title="org.signal.chat.remoteconfiguration.GetConfigurationRequest">org.signal.chat.remoteconfiguration.GetConfigurationRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.GetConfigurationResponse"><span title="org.signal.chat.remoteconfiguration.GetConfigurationResponse">org.signal.chat.remoteconfiguration.GetConfigurationResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<p><p>Fetches the configuration for the authenticated user. Returned
|
||||
values are based on the authenticated account and caller's client platform,
|
||||
which is derived from the "User-Agent" header.</p></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="block">
|
||||
<h5 class="title is-5" id="service-org.signal.chat.remoteconfiguration.RemoteConfiguration-GetBadges">
|
||||
<a href="#service-org.signal.chat.remoteconfiguration.RemoteConfiguration-GetBadges">
|
||||
rpc <code>GetBadges</code>
|
||||
</a>
|
||||
</h5>
|
||||
Request: <code><a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.GetBadgesRequest"><span title="org.signal.chat.remoteconfiguration.GetBadgesRequest">org.signal.chat.remoteconfiguration.GetBadgesRequest</span>
|
||||
</a></code><br>
|
||||
Response: <code><a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.GetBadgesResponse"><span title="org.signal.chat.remoteconfiguration.GetBadgesResponse">org.signal.chat.remoteconfiguration.GetBadgesResponse</span>
|
||||
</a></code><br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<p><p>Returns detailed information for all configured badges, keyed by badge ID.</p>
|
||||
<p>Badge descriptions may contain localized strings. Callers should set their
|
||||
language preferences via gRPC metadata on the request with the key
|
||||
"Accept-Language": https://datatracker.ietf.org/doc/html/rfc3282#section-3</p>
|
||||
<p>Callers may cache a badges result for up to 1 day before checking (via
|
||||
etag) if there are any new updates.</p></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="title is-3">
|
||||
Messages
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.Badges">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.Badges" title="org.signal.chat.remoteconfiguration.Badges">message Badges</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
badges
|
||||
</td>
|
||||
<td>
|
||||
<code title="map<string, Badge>">
|
||||
|
||||
<span>map<string, Badge></span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A map of badge ID to the detailed information for that badge.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.Configuration">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.Configuration" title="org.signal.chat.remoteconfiguration.Configuration">message Configuration</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
configuration
|
||||
</td>
|
||||
<td>
|
||||
<code title="map<string, string>">
|
||||
|
||||
<span>map<string, string></span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>A map of namespaced configuration keys to their resolved values. All
|
||||
configuration values are represented as strings. boolean values are
|
||||
represented as the strings "true" or "false".</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.GetBadgesRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.GetBadgesRequest" title="org.signal.chat.remoteconfiguration.GetBadgesRequest">message GetBadgesRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
etag
|
||||
</td>
|
||||
<td>
|
||||
<code title="bytes">
|
||||
|
||||
<span>bytes</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>If present, the etag from a prior GetBadgesResponse. If the provided etag
|
||||
matches the current badge etag, the server may elide the badge response.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.GetBadgesResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.GetBadgesResponse" title="org.signal.chat.remoteconfiguration.GetBadgesResponse">message GetBadgesResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr class="nohover"><td style="border: 0px"></td></tr>
|
||||
<tr class="nohover">
|
||||
<td class="oneof-heading" colspan="4">
|
||||
<div class="oneof-heading">
|
||||
<strong>oneof response</strong>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
1
|
||||
</td>
|
||||
<td>
|
||||
tagged_badges
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.remoteconfiguration.TaggedBadges">
|
||||
|
||||
<a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.TaggedBadges"><span title="org.signal.chat.remoteconfiguration.TaggedBadges">org.signal.chat.remoteconfiguration.TaggedBadges</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The full set of badges and corresponding etag.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
2
|
||||
</td>
|
||||
<td>
|
||||
etag_matched
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The etag in the request matched the current badge etag.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.GetConfigurationRequest">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.GetConfigurationRequest" title="org.signal.chat.remoteconfiguration.GetConfigurationRequest">message GetConfigurationRequest</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
etag
|
||||
</td>
|
||||
<td>
|
||||
<code title="bytes">
|
||||
|
||||
<span>bytes</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>If present, the etag from a prior GetConfigurationResponse. If the
|
||||
provided etag matches the current configuration etag, the server may elide
|
||||
the configuration response.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.GetConfigurationResponse">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.GetConfigurationResponse" title="org.signal.chat.remoteconfiguration.GetConfigurationResponse">message GetConfigurationResponse</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr class="nohover"><td style="border: 0px"></td></tr>
|
||||
<tr class="nohover">
|
||||
<td class="oneof-heading" colspan="4">
|
||||
<div class="oneof-heading">
|
||||
<strong>oneof response</strong>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
1
|
||||
</td>
|
||||
<td>
|
||||
tagged_configuration
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.remoteconfiguration.TaggedConfiguration">
|
||||
|
||||
<a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.TaggedConfiguration"><span title="org.signal.chat.remoteconfiguration.TaggedConfiguration">org.signal.chat.remoteconfiguration.TaggedConfiguration</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The full configuration and corresponding etag.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
2
|
||||
</td>
|
||||
<td>
|
||||
etag_matched
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>The etag in the request matched the current configuration etag.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.TaggedBadges">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.TaggedBadges" title="org.signal.chat.remoteconfiguration.TaggedBadges">message TaggedBadges</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
badges
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.remoteconfiguration.Badges">
|
||||
|
||||
<a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.Badges"><span title="org.signal.chat.remoteconfiguration.Badges">org.signal.chat.remoteconfiguration.Badges</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
etag
|
||||
</td>
|
||||
<td>
|
||||
<code title="bytes">
|
||||
|
||||
<span>bytes</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>An entity tag for <code>badges</code>. This may be supplied in a subsequent request
|
||||
to optimize bandwidth when the set of badges has not changed.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.TaggedConfiguration">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.remoteconfiguration.TaggedConfiguration" title="org.signal.chat.remoteconfiguration.TaggedConfiguration">message TaggedConfiguration</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
configuration
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.remoteconfiguration.Configuration">
|
||||
|
||||
<a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.Configuration"><span title="org.signal.chat.remoteconfiguration.Configuration">org.signal.chat.remoteconfiguration.Configuration</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
etag
|
||||
</td>
|
||||
<td>
|
||||
<code title="bytes">
|
||||
|
||||
<span>bytes</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>An entity tag for <code>configuration</code>. This may be supplied in a
|
||||
subsequent request to optimize bandwidth when the configuration has not
|
||||
changed.</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,650 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
|
||||
</p>
|
||||
<h3 class="title is-3">
|
||||
|
||||
Package <code>org.signal.chat.require</code>
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.require.AllowedValuesConstraint">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>AllowedValuesConstraint</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.require.ElementConstraint">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>ElementConstraint</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.require.SizeConstraint">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>SizeConstraint</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#message-org.signal.chat.require.ValueRangeConstraint">
|
||||
<span class="tag" style="min-width: 6em">Message</span>
|
||||
<code>ValueRangeConstraint</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#enum-org.signal.chat.require.Auth">
|
||||
<span class="tag" style="min-width: 6em">Enum</span>
|
||||
<code>Auth</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="#enum-org.signal.chat.require.IdentityType">
|
||||
<span class="tag" style="min-width: 6em">Enum</span>
|
||||
<code>IdentityType</code>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="title is-3">
|
||||
Messages
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.require.AllowedValuesConstraint">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.require.AllowedValuesConstraint" title="org.signal.chat.require.AllowedValuesConstraint">message AllowedValuesConstraint</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
ints
|
||||
</td>
|
||||
<td>
|
||||
<code title="int64">
|
||||
|
||||
repeated
|
||||
|
||||
<span>int64</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>Permitted values for integer fields</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
strings
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
repeated
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>Permitted values for string fields</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>
|
||||
enums
|
||||
</td>
|
||||
<td>
|
||||
<code title="string">
|
||||
|
||||
repeated
|
||||
|
||||
<span>string</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"><p>Permitted value names for enum fields</p></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.require.ElementConstraint">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.require.ElementConstraint" title="org.signal.chat.require.ElementConstraint">message ElementConstraint</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
nonEmpty
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
optional
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
size
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.require.SizeConstraint">
|
||||
|
||||
optional
|
||||
|
||||
<a href="org.signal.chat.require.html#message-org.signal.chat.require.SizeConstraint"><span title="org.signal.chat.require.SizeConstraint">org.signal.chat.require.SizeConstraint</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>
|
||||
exactlySize
|
||||
</td>
|
||||
<td>
|
||||
<code title="uint32">
|
||||
|
||||
repeated
|
||||
|
||||
<span>uint32</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>
|
||||
e164
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
optional
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>5</td>
|
||||
<td>
|
||||
base64url
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
optional
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>6</td>
|
||||
<td>
|
||||
range
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.require.ValueRangeConstraint">
|
||||
|
||||
optional
|
||||
|
||||
<a href="org.signal.chat.require.html#message-org.signal.chat.require.ValueRangeConstraint"><span title="org.signal.chat.require.ValueRangeConstraint">org.signal.chat.require.ValueRangeConstraint</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>7</td>
|
||||
<td>
|
||||
identityType
|
||||
</td>
|
||||
<td>
|
||||
<code title="org.signal.chat.require.IdentityType">
|
||||
|
||||
optional
|
||||
|
||||
<a href="org.signal.chat.require.html#enum-org.signal.chat.require.IdentityType"><span title="org.signal.chat.require.IdentityType">org.signal.chat.require.IdentityType</span>
|
||||
</a>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>8</td>
|
||||
<td>
|
||||
specified
|
||||
</td>
|
||||
<td>
|
||||
<code title="bool">
|
||||
|
||||
optional
|
||||
|
||||
<span>bool</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.require.SizeConstraint">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.require.SizeConstraint" title="org.signal.chat.require.SizeConstraint">message SizeConstraint</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
min
|
||||
</td>
|
||||
<td>
|
||||
<code title="uint32">
|
||||
|
||||
optional
|
||||
|
||||
<span>uint32</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
max
|
||||
</td>
|
||||
<td>
|
||||
<code title="uint32">
|
||||
|
||||
optional
|
||||
|
||||
<span>uint32</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
<h4 class="title is-4 type-heading" id="message-org.signal.chat.require.ValueRangeConstraint">
|
||||
<span>
|
||||
<a href="#message-org.signal.chat.require.ValueRangeConstraint" title="org.signal.chat.require.ValueRangeConstraint">message ValueRangeConstraint</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>
|
||||
min
|
||||
</td>
|
||||
<td>
|
||||
<code title="int64">
|
||||
|
||||
optional
|
||||
|
||||
<span>int64</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>
|
||||
max
|
||||
</td>
|
||||
<td>
|
||||
<code title="int64">
|
||||
|
||||
optional
|
||||
|
||||
<span>int64</span>
|
||||
</code>
|
||||
</td>
|
||||
<td class="content"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="title is-3">
|
||||
Enums
|
||||
</h3>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h4 class="title is-4 type-heading" id="enum-org.signal.chat.require.Auth">
|
||||
<a href="#enum-org.signal.chat.require.Auth" title="org.signal.chat.require.Auth">enum Auth</a>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p></p>
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Number</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td><code>AUTH_UNSPECIFIED</code></td>
|
||||
<td>0</td>
|
||||
<td class="content"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>AUTH_ONLY_AUTHENTICATED</code></td>
|
||||
<td>1</td>
|
||||
<td class="content"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>AUTH_ONLY_ANONYMOUS</code></td>
|
||||
<td>2</td>
|
||||
<td class="content"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<h4 class="title is-4 type-heading" id="enum-org.signal.chat.require.IdentityType">
|
||||
<a href="#enum-org.signal.chat.require.IdentityType" title="org.signal.chat.require.IdentityType">enum IdentityType</a>
|
||||
|
||||
</h4>
|
||||
|
||||
<div class="block content">
|
||||
<p><p>This is duplicated from common.proto because:</p>
|
||||
<ol>
|
||||
<li>importing would be a circular dependency</li>
|
||||
<li>the canonical declaration belongs there</li>
|
||||
</ol></p>
|
||||
</div>
|
||||
|
||||
<table class="table is-fullwidth is-hoverable is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Number</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td><code>IDENTITY_TYPE_UNSPECIFIED</code></td>
|
||||
<td>0</td>
|
||||
<td class="content"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>IDENTITY_TYPE_ACI</code></td>
|
||||
<td>1</td>
|
||||
<td class="content"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>IDENTITY_TYPE_PNI</code></td>
|
||||
<td>2</td>
|
||||
<td class="content"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<p class="mb-2">
|
||||
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
|
||||
</p>
|
||||
<h3 class="title is-3">
|
||||
|
||||
Package <code>org.signal.chat.tag</code>
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="block">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,144 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Protobuf module documentation</title>
|
||||
<link rel="stylesheet" href="static/mystyles.css" />
|
||||
<script src="static/fontawesome.js"></script>
|
||||
<script src="static/lunr.js"></script>
|
||||
<script src="static/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="level pt-6 mb-5 pb-2 bottom-border">
|
||||
<div class="level-left">
|
||||
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
|
||||
<a class="link is-info" href="index.html">
|
||||
Protobuf module documentation
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="level-right">
|
||||
|
||||
<form action="search.html" class="mr-2 has-text-centered">
|
||||
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
|
||||
<input type="submit" class="button is-primary mr-5" value="Search" />
|
||||
</form>
|
||||
|
||||
|
||||
<p class="level-item has-text-centered is-size-5">
|
||||
<a href="" class="link is-info mr-5" target="_blank">
|
||||
|
||||
<span>Source</span>
|
||||
</a>
|
||||
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
|
||||
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
|
||||
<mask class="moon" id="moon-mask">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
||||
<circle cx="24" cy="10" r="6" fill="black" />
|
||||
</mask>
|
||||
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
|
||||
<g class="sun-beams" stroke="currentColor">
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="container mb-6">
|
||||
<script>
|
||||
const searchDocuments = {"org.signal.chat.account": {"package": "org.signal.chat.account", "url": "org.signal.chat.account.html", "content": "org.signal.chat.account\n\norg\nsignal\nchat\naccount\nAccounts\nProvides methods for working with Signal accounts.\nGetAccountIdentity\nReturns basic identifiers for the authenticated account.\norg\nsignal\nchat\naccount\nGetAccountIdentityRequest\norg\nsignal\nchat\naccount\nGetAccountIdentityResponse\nGetEntitlements\nReturns entitlements for the authenticated account.\norg\nsignal\nchat\naccount\nGetEntitlementsRequest\norg\nsignal\nchat\naccount\nGetEntitlementsResponse\nDeleteAccount\nDeletes the authenticated account, purging all associated data in the\n process.\norg\nsignal\nchat\naccount\nDeleteAccountRequest\norg\nsignal\nchat\naccount\nDeleteAccountResponse\nSetRegistrationLock\nSets the registration lock secret for the authenticated account. To remove\n a registration lock, please use `ClearRegistrationLock`.\norg\nsignal\nchat\naccount\nSetRegistrationLockRequest\norg\nsignal\nchat\naccount\nSetRegistrationLockResponse\nClearRegistrationLock\nRemoves any registration lock credentials from the authenticated account.\norg\nsignal\nchat\naccount\nClearRegistrationLockRequest\norg\nsignal\nchat\naccount\nClearRegistrationLockResponse\nReserveUsernameHash\nAttempts to reserve one of multiple given username hashes. Reserved\n usernames may be claimed later via `ConfirmUsernameHash`.\norg\nsignal\nchat\naccount\nReserveUsernameHashRequest\norg\nsignal\nchat\naccount\nReserveUsernameHashResponse\nConfirmUsernameHash\nSets the username hash/encrypted username to a previously-reserved value\n (see `ReserveUsernameHash`).\norg\nsignal\nchat\naccount\nConfirmUsernameHashRequest\norg\nsignal\nchat\naccount\nConfirmUsernameHashResponse\nDeleteUsernameHash\nClears the current username hash, ciphertext, and link for the\n authenticated user.\norg\nsignal\nchat\naccount\nDeleteUsernameHashRequest\norg\nsignal\nchat\naccount\nDeleteUsernameHashResponse\nSetUsernameLink\nAssociates the given username ciphertext with the account, replacing any\n previously stored ciphertext. A new link handle will optionally be created,\n and the link handle to use will be returned in any event.\norg\nsignal\nchat\naccount\nSetUsernameLinkRequest\norg\nsignal\nchat\naccount\nSetUsernameLinkResponse\nDeleteUsernameLink\nClears any username link associated with the authenticated account.\norg\nsignal\nchat\naccount\nDeleteUsernameLinkRequest\norg\nsignal\nchat\naccount\nDeleteUsernameLinkResponse\nConfigureUnidentifiedAccess\nConfigures \"unidentified access\" keys and preferences for the authenticated\n account. Other users permitted to interact with this account anonymously\n may take actions like fetching pre-keys and profiles for this account or\n sending sealed-sender messages without providing identifying credentials.\norg\nsignal\nchat\naccount\nConfigureUnidentifiedAccessRequest\norg\nsignal\nchat\naccount\nConfigureUnidentifiedAccessResponse\nSetDiscoverableByPhoneNumber\nSets whether the authenticated account may be discovered by phone number\n via the Contact Discovery Service (CDS).\norg\nsignal\nchat\naccount\nSetDiscoverableByPhoneNumberRequest\norg\nsignal\nchat\naccount\nSetDiscoverableByPhoneNumberResponse\nSetRegistrationRecoveryPassword\nSets the registration recovery password for the authenticated account.\norg\nsignal\nchat\naccount\nSetRegistrationRecoveryPasswordRequest\norg\nsignal\nchat\naccount\nSetRegistrationRecoveryPasswordResponse\nSetZkCredentialKey\nStore a public key used to issue and verify zero-knowledge (anonymous) credentials for the account.\norg\nsignal\nchat\naccount\nSetZkCredentialKeyRequest\norg\nsignal\nchat\naccount\nSetZkCredentialKeyResponse\nChangeNumber\nChanges the phone number associated with the authenticated account.\norg\nsignal\nchat\naccount\nChangeNumberRequest\norg\nsignal\nchat\naccount\nChangeNumberResponse\nGetAccountDataReport\nProduces a report of non-ephemeral account data stored by the service\norg\nsignal\nchat\naccount\nGetAccountDataReportRequest\norg\nsignal\nchat\naccount\nGetAccountDataReportResponse\nGetCapabilities\nGets the capabilities for the authenticated account.\norg\nsignal\nchat\naccount\nGetCapabilitiesRequest\norg\nsignal\nchat\naccount\nGetCapabilitiesResponse\nGenerateTotpKey\nGenerates and stores a pending TOTP key for the authenticated account.\n To \"activate\" the key, callers must call the `ConfirmTotpKey` endpoint.\n\n TOTP keys may only be generated for accounts without phone numbers.\norg\nsignal\nchat\naccount\nGenerateTotpKeyRequest\norg\nsignal\nchat\naccount\nGenerateTotpKeyResponse\nConfirmTotpKey\nConfirms that the caller has stored and can derive one-time passwords from\n a pending TOTP key generated via `GenerateTotpKey` and stores/activates the\n key for the caller's account\n\n TOTP keys may only be generated for accounts without phone numbers.\norg\nsignal\nchat\naccount\nConfirmTotpKLine truncated
|
||||
const searchIndex = {"version": "2.3.9", "fields": ["content", "url"], "fieldVectors": [["content/org.signal.chat.account", [0, 1.295, 1, 0.168, 2, 0.168, 3, 0.168, 4, 1.199, 5, 0.369, 6, 0.665, 7, 0.562, 8, 1.295, 9, 0.905, 10, 1.295, 11, 1.597, 12, 1.301, 13, 2.111, 14, 2.111, 15, 1.295, 16, 1.694, 17, 2.111, 18, 3.08, 19, 1.295, 20, 0.746, 21, 1.295, 22, 1.156, 23, 1.953, 24, 0.872, 25, 2.111, 26, 2.111, 27, 1.295, 28, 0.884, 29, 2.512, 30, 3.321, 31, 2.073, 32, 2.382, 33, 1.295, 34, 0.54, 35, 2.111, 36, 2.111, 37, 2.111, 38, 1.222, 39, 2.111, 40, 2.111, 41, 2.111, 42, 1.42, 43, 3.836, 44, 1.553, 45, 1.216, 46, 2.12, 47, 2.575, 48, 2.285, 49, 2.671, 50, 1.04, 51, 1.202, 52, 2.111, 53, 2.111, 54, 2.111, 55, 1.295, 56, 1.052, 57, 0.696, 58, 0.872, 59, 2.111, 60, 2.671, 61, 1.295, 62, 2.145, 63, 1.012, 64, 2.988, 65, 2.039, 66, 1.681, 67, 2.111, 68, 2.111, 69, 1.295, 70, 0.872, 71, 2.303, 72, 1.254, 73, 3.04, 74, 0.562, 75, 1.535, 76, 1.295, 77, 2.111, 78, 2.111, 79, 1.295, 80, 2.111, 81, 2.111, 82, 1.295, 83, 1.331, 84, 2.209, 85, 1.452, 86, 1.152, 87, 0.872, 88, 0.916, 89, 2.473, 90, 1.472, 91, 1.295, 92, 1.04, 93, 0.872, 94, 1.535, 95, 1.42, 96, 1.735, 97, 0.646, 98, 0.646, 99, 0.975, 100, 1.578, 101, 2.111, 102, 2.111, 103, 1.295, 104, 1.012, 105, 2.671, 106, 2.342, 107, 1.631, 108, 2.111, 109, 2.111, 110, 1.467, 111, 2.111, 112, 2.111, 113, 2.111, 114, 1.295, 115, 2.145, 116, 2.251, 117, 2.111, 118, 2.111, 119, 1.295, 120, 1.774, 121, 0.562, 122, 2.095, 123, 1.538, 124, 1.694, 125, 2.111, 126, 2.111, 127, 1.295, 128, 0.799, 129, 3.392, 130, 2.111, 131, 1.295, 132, 1.694, 133, 2.145, 134, 1.216, 135, 1.04, 136, 2.111, 137, 2.111, 138, 2.111, 139, 1.42, 140, 3.414, 141, 2.111, 142, 2.111, 143, 2.111, 144, 1.298, 145, 2.723, 146, 4.749, 147, 1.159, 148, 1.222, 149, 0.607, 150, 2.111, 151, 0.646, 152, 2.111, 153, 2.671, 154, 3.21, 155, 1.42, 156, 0.995, 157, 1.295, 158, 0.49, 159, 2.111, 160, 2.671, 161, 1.295, 162, 2.073, 163, 0.872, 164, 3.999, 165, 3.392, 166, 2.073, 167, 2.111, 168, 2.671, 169, 1.295, 170, 1.295, 171, 1.04, 172, 1.295, 173, 2.111, 174, 2.671, 175, 1.295, 176, 1.189, 177, 4.517, 178, 2.111, 179, 3.392, 180, 1.295, 181, 0.562, 182, 1.337, 183, 1.798, 184, 1.912, 185, 2.145, 186, 1.798, 187, 1.798, 188, 1.337, 189, 2.671, 190, 1.331, 191, 1.912, 192, 2.111, 193, 2.671, 194, 1.295, 195, 2.111, 196, 2.111, 197, 1.295, 198, 0.66, 199, 0.872, 200, 3.08, 201, 2.111, 202, 2.671, 203, 1.295, 204, 1.295, 205, 2.111, 206, 2.111, 207, 1.295, 208, 1.04, 209, 0.562, 210, 1.295, 211, 0.646, 212, 2.111, 213, 2.111, 214, 1.295, 215, 3.08, 216, 2.111, 217, 2.111, 218, 1.295, 219, 2.111, 220, 2.111, 221, 1.295, 222, 2.145, 223, 2.073, 224, 1.216, 225, 2.111, 226, 2.111, 227, 1.295, 228, 1.798, 229, 2.073, 230, 2.111, 231, 1.159, 232, 1.337, 233, 0.799, 234, 1.295, 235, 0.872, 236, 0.843, 237, 1.664, 238, 0.872, 239, 0.746, 240, 1.04, 241, 0.746, 242, 0.872, 243, 1.295, 244, 2.073, 245, 1.295, 246, 2.111, 247, 1.295, 248, 1.267, 249, 0.646, 250, 1.295, 251, 1.04, 252, 2.111, 253, 1.83, 254, 1.42, 255, 1.04, 256, 1.813, 257, 0.646, 258, 0.872, 259, 1.295, 260, 1.42, 261, 0.872, 262, 1.149, 263, 2.111, 264, 1.691, 265, 1.216, 266, 1.295, 267, 1.04, 268, 1.295, 269, 0.646, 270, 1.04, 271, 1.295, 272, 2.145, 273, 0.768, 274, 1.04, 275, 1.694, 276, 2.111, 277, 1.295, 278, 1.694, 279, 1.42, 280, 1.694, 281, 1.295, 282, 1.774, 283, 1.295, 284, 1.295, 285, 1.295, 286, 1.295, 287, 0.799, 288, 0.49, 289, 1.295, 290, 1.42, 291, 1.295, 292, 1.377, 293, 0.872, 294, 1.018, 295, 1.538, 296, 1.216, 297, 0.428, 298, 0.872, 299, 1.798, 300, 0.616, 301, 1.216, 302, 1.295, 303, 1.774, 304, 1.295, 305, 3.08, 306, 2.111, 307, 1.159, 308, 2.473, 309, 2.111, 310, 1.538, 311, 1.295, 312, 1.052, 313, 1.295, 314, 1.04, 315, 1.04, 316, 3.08, 317, 2.303, 318, 3.392, 319, 1.018, 320, 1.377, 321, 3.079, 322, 2.473, 323, 1.295, 324, 1.04, 325, 2.473, 326, 2.671, 327, 1.04, 328, 1.295, 329, 1.04, 330, 1.295, 331, 1.04, 332, 1.295, 333, 0.646, 334, 0.916, 335, 1.295, 336, 2.111, 337, 1.295, 338, 0.646, 339, 1.295, 340, 2.145, 341, 0.451, 342, 1.295, 343, 1.295, 344, 1.295, 345, 1.42, 346, 1.295, 347, 3.999, 348, 1.295, 349, 1.694, 350, 1.295, 351, 1.295, 352, 2.473, 353, 1.012, 354, 0.766, 355, 1.04, 356, 1.04, 357, 1.295, 358, 1.295, 359, 1.42, 360, 0.916, 361, 0.49, 362, 1.295, 363, 1.295, 364, 0.746, 365, 0.322, 366, 0.916, 367, 1.295, 368, 1.295, 369, 1.04, 370, 0.746, 371, 1.295, 372, 2.111, 373, 1.295, 374, 1.295, 375, 1.295, 376, 1.295, 377, 2.671, 378, 1.295, 379, 0.872, 380, 0.916, 381, 0.746, 382, 0.562, 383, 0.746, 384, 0.428, 385, 2.145, 386, 0.746, 387, 1.04, 388, 1.295, 389, 2.111, 390, 2.473, 391, 1.774, 392, 1.295, 393, 1.295, 394, 1.295, 395, 1.295, 396, 0.872, 397, 0.916, 398, 1.295, 399, 1.04, 400, 1.295, 401, 2.111, 402, 1.295, 403, 1.295, 404, 1.295, 405, 0.872, 406, 0.746, 407, 1.295, 408, 1.295, 409, 1.295, 410, 0.646, 411, 1.42, 412, 0.746, 413, 0.277, 414, 2.111, 415, 1.295, 416, 0.746, 417, 1.295, 418, 0.872,Line truncated
|
||||
|
||||
const idx = lunr.Index.load(searchIndex);
|
||||
|
||||
function displaySearchResults() {
|
||||
const query = new URLSearchParams(window.location.search).get('query');
|
||||
|
||||
if (query) {
|
||||
document.getElementById('mainInputQuery').value = query;
|
||||
|
||||
const results = idx.query(function (q) {
|
||||
words = query.toLowerCase().split(" "); // toLowerCase() is needed to make the search case insensitive.
|
||||
for (n in words) {
|
||||
const word = words[n];
|
||||
|
||||
if (!word) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// look for an exact match and apply a large positive boost
|
||||
q.term(word, { usePipeline: true, boost: 100 })
|
||||
|
||||
// look for terms that match the beginning of this queryTerm and apply a medium boost
|
||||
q.term(word + "*", { usePipeline: false, boost: 10 })
|
||||
}
|
||||
});
|
||||
|
||||
const searchResults = document.getElementById('searchResults');
|
||||
|
||||
if (results.length > 0) {
|
||||
let resultList = ''
|
||||
for (const n in results) {
|
||||
// Use the unique ref from the results list to get the full item
|
||||
// so you can build its <li>
|
||||
const doc = searchDocuments[results[n].ref]
|
||||
resultList += '<h5 class="title is-5 mt-3"><a href="' + doc.url + '">' + doc.package + '</a></h5>'
|
||||
// Add a short clip of the content
|
||||
resultList += '<p>' + doc.content.substring(0, 150) + '...</p><hr />'
|
||||
}
|
||||
searchResults.innerHTML = resultList
|
||||
} else {
|
||||
searchResults.innerHTML = '<p>No search results.</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("load", displaySearchResults);
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<p class="block">
|
||||
Enter a query to search this documentation.
|
||||
</p>
|
||||
<div class="field is-horizontal">
|
||||
<form class="field-body">
|
||||
<div class="field">
|
||||
<p class="control is-expanded">
|
||||
<input id="mainInputQuery" type="text" name="query" class="input" placeholder="Search query">
|
||||
</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<p class="control is-expanded">
|
||||
<input type="submit" class="button is-primary" value="Search" />
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="block mt-6">
|
||||
<div id="searchResults"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,2 @@
|
||||
window.FontAwesomeKitConfig = {"asyncLoading":{"enabled":false},"autoA11y":{"enabled":true},"baseUrl":"https://ka-f.fontawesome.com","baseUrlKit":"https://kit.fontawesome.com","detectConflictsUntil":null,"iconUploads":{},"id":82004925,"license":"free","method":"css","minify":{"enabled":true},"token":"4d30d3d1aa","v4FontFaceShim":{"enabled":true},"v4shim":{"enabled":true},"v5FontFaceShim":{"enabled":true},"version":"6.4.2"};
|
||||
!function(t){"function"==typeof define&&define.amd?define("kit-loader",t):t()}((function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,c,a=[],u=!0,f=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(a.push(r.value),a.length!==e);u=!0);}catch(t){f=!0,o=t}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(f)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n=e&&e.addOn||"",r=e&&e.baseFilename||t.license+n,o=e&&e.minify?".min":"",i=e&&e.fileSuffix||t.method,c=e&&e.subdir||t.method;return t.baseUrl+"/releases/"+("latest"===t.version?"latest":"v".concat(t.version))+"/"+c+"/"+r+o+"."+i}function a(t,e){var n=e||["fa"],r="."+Array.prototype.join.call(n,",."),o=t.querySelectorAll(r);Array.prototype.forEach.call(o,(function(e){var n=e.getAttribute("title");e.setAttribute("aria-hidden","true");var r=!e.nextElementSibling||!e.nextElementSibling.classList.contains("sr-only");if(n&&r){var o=t.createElement("span");o.innerHTML=n,o.classList.add("sr-only"),e.parentNode.insertBefore(o,e.nextSibling)}}))}var u,f=function(){},s="undefined"!=typeof global&&void 0!==global.process&&"function"==typeof global.process.emit,l="undefined"==typeof setImmediate?setTimeout:setImmediate,d=[];function h(){for(var t=0;t<d.length;t++)d[t][0](d[t][1]);d=[],u=!1}function m(t,e){d.push([t,e]),u||(u=!0,l(h,0))}function p(t){var e=t.owner,n=e._state,r=e._data,o=t[n],i=t.then;if("function"==typeof o){n="fulfilled";try{r=o(r)}catch(t){g(i,t)}}v(i,r)||("fulfilled"===n&&b(i,r),"rejected"===n&&g(i,r))}function v(t,e){var r;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"===n(e))){var o=e.then;if("function"==typeof o)return o.call(e,(function(n){r||(r=!0,e===n?y(t,n):b(t,n))}),(function(e){r||(r=!0,g(t,e))})),!0}}catch(e){return r||g(t,e),!0}return!1}function b(t,e){t!==e&&v(t,e)||y(t,e)}function y(t,e){"pending"===t._state&&(t._state="settled",t._data=e,m(A,t))}function g(t,e){"pending"===t._state&&(t._state="settled",t._data=e,m(S,t))}function w(t){t._then=t._then.forEach(p)}function A(t){t._state="fulfilled",w(t)}function S(t){t._state="rejected",w(t),!t._handled&&s&&global.process.emit("unhandledRejection",t._data,t)}function O(t){global.process.emit("rejectionHandled",t)}function j(t){if("function"!=typeof t)throw new TypeError("Promise resolver "+t+" is not a function");if(this instanceof j==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],function(t,e){function n(t){g(e,t)}try{t((function(t){b(e,t)}),n)}catch(t){n(t)}}(t,this)}j.prototype={constructor:j,_state:"pending",_then:null,_data:void 0,_handled:!1,then:function(t,e){var n={owner:this,then:new this.constructor(f),fulfilled:t,rejected:e};return!e&&!t||this._handled||(this._handled=!0,"rejected"===this._state&&s&&m(O,this)),"fulfilled"===this._state||"rejected"==Line truncated
|
||||
+3475
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,54 @@
|
||||
const storageKey = 'theme-preference';
|
||||
|
||||
const onClick = () => {
|
||||
// flip current value
|
||||
theme.value = theme.value === 'light'
|
||||
? 'dark'
|
||||
: 'light';
|
||||
|
||||
setPreference();
|
||||
}
|
||||
|
||||
const getColorPreference = () => {
|
||||
if (localStorage.getItem(storageKey))
|
||||
return localStorage.getItem(storageKey);
|
||||
else
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
? 'dark'
|
||||
: 'light';
|
||||
}
|
||||
|
||||
const setPreference = () => {
|
||||
localStorage.setItem(storageKey, theme.value);
|
||||
reflectPreference();
|
||||
}
|
||||
|
||||
const reflectPreference = () => {
|
||||
document.documentElement.className =
|
||||
theme.value === 'dark' ? 'dark' : '';
|
||||
|
||||
document.documentElement
|
||||
.setAttribute('data-theme', theme.value);
|
||||
}
|
||||
|
||||
const theme = {
|
||||
value: getColorPreference(),
|
||||
}
|
||||
|
||||
window.addEventListener(
|
||||
"load",
|
||||
() => {
|
||||
document
|
||||
.querySelector('#theme-toggle')
|
||||
.addEventListener('click', onClick);
|
||||
});
|
||||
|
||||
// sync with system changes
|
||||
window
|
||||
.matchMedia('(prefers-color-scheme: dark)')
|
||||
.addEventListener('change', ({ matches: isDark }) => {
|
||||
theme.value = isDark ? 'dark' : 'light';
|
||||
setPreference();
|
||||
});
|
||||
|
||||
reflectPreference();
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Signal Server API</title>
|
||||
|
||||
<script src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script>
|
||||
<link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css">
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<elements-api
|
||||
apiDescriptionUrl="signal-server-openapi.yaml"
|
||||
router="hash"
|
||||
/>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,397 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<name>Central Repository</name>
|
||||
<url>https://repo.maven.apache.org/maven2</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>dynamodb-local-oregon</id>
|
||||
<name>DynamoDB Local Release Repository</name>
|
||||
<url>https://s3-us-west-2.amazonaws.com/dynamodb-local/release</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<modules>
|
||||
<module>redis-dispatch</module>
|
||||
<module>websocket-resources</module>
|
||||
<module>gcm-sender-async</module>
|
||||
<module>service</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<aws.sdk.version>1.11.939</aws.sdk.version>
|
||||
<aws.sdk2.version>2.16.66</aws.sdk2.version>
|
||||
<commons-codec.version>1.15</commons-codec.version>
|
||||
<commons-csv.version>1.8</commons-csv.version>
|
||||
<commons-io.version>2.9.0</commons-io.version>
|
||||
<dropwizard.version>2.0.22</dropwizard.version>
|
||||
<dropwizard-metrics-datadog.version>1.1.13</dropwizard-metrics-datadog.version>
|
||||
<guava.version>30.1.1-jre</guava.version>
|
||||
<jaxb.version>2.3.1</jaxb.version>
|
||||
<jedis.version>2.9.0</jedis.version>
|
||||
<lettuce.version>6.0.4.RELEASE</lettuce.version>
|
||||
<libphonenumber.version>8.12.23</libphonenumber.version>
|
||||
<logstash.logback.version>6.6</logstash.logback.version>
|
||||
<micrometer.version>1.5.3</micrometer.version>
|
||||
<mockito.version>2.25.1</mockito.version>
|
||||
<netty.version>4.1.65.Final</netty.version>
|
||||
<netty.tcnative-boringssl-static.version>2.0.39.Final</netty.tcnative-boringssl-static.version>
|
||||
<opentest4j.version>1.2.0</opentest4j.version>
|
||||
<postgresql.version>9.4-1201-jdbc41</postgresql.version>
|
||||
<protobuf.version>3.17.1</protobuf.version>
|
||||
<pushy.version>0.14.2</pushy.version>
|
||||
<resilience4j.version>1.5.0</resilience4j.version>
|
||||
<semver4j.version>3.1.0</semver4j.version>
|
||||
<slf4j.version>1.7.30</slf4j.version>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<groupId>org.whispersystems.textsecure</groupId>
|
||||
<artifactId>TextSecureServer</artifactId>
|
||||
<version>JGITVER</version>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-dependencies</artifactId>
|
||||
<version>${dropwizard.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-bom</artifactId>
|
||||
<version>${netty.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-bom</artifactId>
|
||||
<version>${aws.sdk.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>software.amazon.awssdk</groupId>
|
||||
<artifactId>bom</artifactId>
|
||||
<version>${aws.sdk2.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.resilience4j</groupId>
|
||||
<artifactId>resilience4j-bom</artifactId>
|
||||
<version>${resilience4j.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-bom</artifactId>
|
||||
<version>${micrometer.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.eatthepath</groupId>
|
||||
<artifactId>pushy</artifactId>
|
||||
<version>${pushy.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.eatthepath</groupId>
|
||||
<artifactId>pushy-dropwizard-metrics-listener</artifactId>
|
||||
<version>${pushy.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>${protobuf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.googlecode.libphonenumber</groupId>
|
||||
<artifactId>libphonenumber</artifactId>
|
||||
<version>${libphonenumber.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vdurmont</groupId>
|
||||
<artifactId>semver4j</artifactId>
|
||||
<version>${semver4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>${commons-codec.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons-io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.lettuce</groupId>
|
||||
<artifactId>lettuce-core</artifactId>
|
||||
<version>${lettuce.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative-boringssl-static</artifactId>
|
||||
<version>${netty.tcnative-boringssl-static.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>${jaxb.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.logstash.logback</groupId>
|
||||
<artifactId>logstash-logback-encoder</artifactId>
|
||||
<version>${logstash.logback.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-csv</artifactId>
|
||||
<version>${commons-csv.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.coursera</groupId>
|
||||
<artifactId>dropwizard-metrics-datadog</artifactId>
|
||||
<version>${dropwizard-metrics-datadog.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>${mockito.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-inline</artifactId>
|
||||
<version>${mockito.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.opentest4j</groupId>
|
||||
<artifactId>opentest4j</artifactId>
|
||||
<version>${opentest4j.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>${postgresql.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-nop</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
<version>${jedis.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-all</artifactId>
|
||||
<version>1.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.tomakehurst</groupId>
|
||||
<artifactId>wiremock-jre8</artifactId>
|
||||
<version>2.27.2</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>${mockito.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>kr.motd.maven</groupId>
|
||||
<artifactId>os-maven-plugin</artifactId>
|
||||
<version>1.7.0</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.xolstice.maven.plugins</groupId>
|
||||
<artifactId>protobuf-maven-plugin</artifactId>
|
||||
<version>0.6.1</version>
|
||||
<configuration>
|
||||
<protocArtifact>com.google.protobuf:protoc:3.17.2:exe:${os.detected.classifier}</protocArtifact>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>11</source>
|
||||
<target>11</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeScope>test</includeScope>
|
||||
<includeTypes>so,dll,dylib</includeTypes>
|
||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>sqlite4java.library.path</name>
|
||||
<value>${project.build.directory}/lib</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>3.0.0-M3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<dependencyConvergence/>
|
||||
<requireMavenVersion>
|
||||
<version>3.0.0</version>
|
||||
</requireMavenVersion>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>3.0.0-M1</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>3.0.0-M1</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>TextSecureServer</artifactId>
|
||||
<groupId>org.whispersystems.textsecure</groupId>
|
||||
<version>JGITVER</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>redis-dispatch</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,11 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch;
|
||||
|
||||
public interface DispatchChannel {
|
||||
void onDispatchMessage(String channel, byte[] message);
|
||||
void onDispatchSubscribed(String channel);
|
||||
void onDispatchUnsubscribed(String channel);
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.dispatch.io.RedisPubSubConnectionFactory;
|
||||
import org.whispersystems.dispatch.redis.PubSubConnection;
|
||||
import org.whispersystems.dispatch.redis.PubSubReply;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
|
||||
public class DispatchManager extends Thread {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(DispatchManager.class);
|
||||
private final Executor executor = Executors.newCachedThreadPool();
|
||||
private final Map<String, DispatchChannel> subscriptions = new ConcurrentHashMap<>();
|
||||
|
||||
private final Optional<DispatchChannel> deadLetterChannel;
|
||||
private final RedisPubSubConnectionFactory redisPubSubConnectionFactory;
|
||||
|
||||
private PubSubConnection pubSubConnection;
|
||||
private volatile boolean running;
|
||||
|
||||
public DispatchManager(RedisPubSubConnectionFactory redisPubSubConnectionFactory,
|
||||
Optional<DispatchChannel> deadLetterChannel)
|
||||
{
|
||||
this.redisPubSubConnectionFactory = redisPubSubConnectionFactory;
|
||||
this.deadLetterChannel = deadLetterChannel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
this.pubSubConnection = redisPubSubConnectionFactory.connect();
|
||||
this.running = true;
|
||||
super.start();
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
this.running = false;
|
||||
this.pubSubConnection.close();
|
||||
}
|
||||
|
||||
public synchronized void subscribe(String name, DispatchChannel dispatchChannel) {
|
||||
Optional<DispatchChannel> previous = Optional.ofNullable(subscriptions.get(name));
|
||||
subscriptions.put(name, dispatchChannel);
|
||||
|
||||
try {
|
||||
pubSubConnection.subscribe(name);
|
||||
} catch (IOException e) {
|
||||
logger.warn("Subscription error", e);
|
||||
}
|
||||
|
||||
previous.ifPresent(channel -> dispatchUnsubscription(name, channel));
|
||||
}
|
||||
|
||||
public synchronized void unsubscribe(String name, DispatchChannel channel) {
|
||||
Optional<DispatchChannel> subscription = Optional.ofNullable(subscriptions.get(name));
|
||||
|
||||
if (subscription.isPresent() && subscription.get() == channel) {
|
||||
subscriptions.remove(name);
|
||||
|
||||
try {
|
||||
pubSubConnection.unsubscribe(name);
|
||||
} catch (IOException e) {
|
||||
logger.warn("Unsubscribe error", e);
|
||||
}
|
||||
|
||||
dispatchUnsubscription(name, subscription.get());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasSubscription(String name) {
|
||||
return subscriptions.containsKey(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
while (running) {
|
||||
try {
|
||||
PubSubReply reply = pubSubConnection.read();
|
||||
|
||||
switch (reply.getType()) {
|
||||
case UNSUBSCRIBE: break;
|
||||
case SUBSCRIBE: dispatchSubscribe(reply); break;
|
||||
case MESSAGE: dispatchMessage(reply); break;
|
||||
default: throw new AssertionError("Unknown pubsub reply type! " + reply.getType());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.warn("***** PubSub Connection Error *****", e);
|
||||
if (running) {
|
||||
this.pubSubConnection.close();
|
||||
this.pubSubConnection = redisPubSubConnectionFactory.connect();
|
||||
resubscribeAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger.warn("DispatchManager Shutting Down...");
|
||||
}
|
||||
|
||||
private void dispatchSubscribe(final PubSubReply reply) {
|
||||
Optional<DispatchChannel> subscription = Optional.ofNullable(subscriptions.get(reply.getChannel()));
|
||||
|
||||
if (subscription.isPresent()) {
|
||||
dispatchSubscription(reply.getChannel(), subscription.get());
|
||||
} else {
|
||||
logger.info("Received subscribe event for non-existing channel: " + reply.getChannel());
|
||||
}
|
||||
}
|
||||
|
||||
private void dispatchMessage(PubSubReply reply) {
|
||||
Optional<DispatchChannel> subscription = Optional.ofNullable(subscriptions.get(reply.getChannel()));
|
||||
|
||||
if (subscription.isPresent()) {
|
||||
dispatchMessage(reply.getChannel(), subscription.get(), reply.getContent().get());
|
||||
} else if (deadLetterChannel.isPresent()) {
|
||||
dispatchMessage(reply.getChannel(), deadLetterChannel.get(), reply.getContent().get());
|
||||
} else {
|
||||
logger.warn("Received message for non-existing channel, with no dead letter handler: " + reply.getChannel());
|
||||
}
|
||||
}
|
||||
|
||||
private void resubscribeAll() {
|
||||
new Thread(() -> {
|
||||
synchronized (DispatchManager.this) {
|
||||
try {
|
||||
for (String name : subscriptions.keySet()) {
|
||||
pubSubConnection.subscribe(name);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.warn("***** RESUBSCRIPTION ERROR *****", e);
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
private void dispatchMessage(final String name, final DispatchChannel channel, final byte[] message) {
|
||||
executor.execute(() -> channel.onDispatchMessage(name, message));
|
||||
}
|
||||
|
||||
private void dispatchSubscription(final String name, final DispatchChannel channel) {
|
||||
executor.execute(() -> channel.onDispatchSubscribed(name));
|
||||
}
|
||||
|
||||
private void dispatchUnsubscription(final String name, final DispatchChannel channel) {
|
||||
executor.execute(() -> channel.onDispatchUnsubscribed(name));
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.io;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class RedisInputStream {
|
||||
|
||||
private static final byte CR = 0x0D;
|
||||
private static final byte LF = 0x0A;
|
||||
|
||||
private final InputStream inputStream;
|
||||
|
||||
public RedisInputStream(InputStream inputStream) {
|
||||
this.inputStream = inputStream;
|
||||
}
|
||||
|
||||
public String readLine() throws IOException {
|
||||
ByteArrayOutputStream boas = new ByteArrayOutputStream();
|
||||
|
||||
boolean foundCr = false;
|
||||
|
||||
while (true) {
|
||||
int character = inputStream.read();
|
||||
|
||||
if (character == -1) {
|
||||
throw new IOException("Stream closed!");
|
||||
}
|
||||
|
||||
boas.write(character);
|
||||
|
||||
if (foundCr && character == LF) break;
|
||||
else if (character == CR) foundCr = true;
|
||||
else if (foundCr) foundCr = false;
|
||||
}
|
||||
|
||||
byte[] data = boas.toByteArray();
|
||||
return new String(data, 0, data.length-2);
|
||||
}
|
||||
|
||||
public byte[] readFully(int size) throws IOException {
|
||||
byte[] result = new byte[size];
|
||||
int offset = 0;
|
||||
int remaining = result.length;
|
||||
|
||||
while (remaining > 0) {
|
||||
int read = inputStream.read(result, offset, remaining);
|
||||
|
||||
if (read < 0) {
|
||||
throw new IOException("Stream closed!");
|
||||
}
|
||||
|
||||
offset += read;
|
||||
remaining -= read;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
inputStream.close();
|
||||
}
|
||||
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.io;
|
||||
|
||||
import org.whispersystems.dispatch.redis.PubSubConnection;
|
||||
|
||||
public interface RedisPubSubConnectionFactory {
|
||||
|
||||
PubSubConnection connect();
|
||||
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.redis;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.dispatch.io.RedisInputStream;
|
||||
import org.whispersystems.dispatch.redis.protocol.ArrayReplyHeader;
|
||||
import org.whispersystems.dispatch.redis.protocol.IntReply;
|
||||
import org.whispersystems.dispatch.redis.protocol.StringReplyHeader;
|
||||
import org.whispersystems.dispatch.util.Util;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.Socket;
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
public class PubSubConnection {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(PubSubConnection.class);
|
||||
|
||||
private static final byte[] UNSUBSCRIBE_TYPE = {'u', 'n', 's', 'u', 'b', 's', 'c', 'r', 'i', 'b', 'e' };
|
||||
private static final byte[] SUBSCRIBE_TYPE = {'s', 'u', 'b', 's', 'c', 'r', 'i', 'b', 'e' };
|
||||
private static final byte[] MESSAGE_TYPE = {'m', 'e', 's', 's', 'a', 'g', 'e' };
|
||||
|
||||
private static final byte[] SUBSCRIBE_COMMAND = {'S', 'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E', ' ' };
|
||||
private static final byte[] UNSUBSCRIBE_COMMAND = {'U', 'N', 'S', 'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E', ' '};
|
||||
private static final byte[] CRLF = {'\r', '\n' };
|
||||
|
||||
private final OutputStream outputStream;
|
||||
private final RedisInputStream inputStream;
|
||||
private final Socket socket;
|
||||
private final AtomicBoolean closed;
|
||||
|
||||
public PubSubConnection(Socket socket) throws IOException {
|
||||
this.socket = socket;
|
||||
this.outputStream = socket.getOutputStream();
|
||||
this.inputStream = new RedisInputStream(new BufferedInputStream(socket.getInputStream()));
|
||||
this.closed = new AtomicBoolean(false);
|
||||
}
|
||||
|
||||
public void subscribe(String channelName) throws IOException {
|
||||
if (closed.get()) throw new IOException("Connection closed!");
|
||||
|
||||
byte[] command = Util.combine(SUBSCRIBE_COMMAND, channelName.getBytes(), CRLF);
|
||||
outputStream.write(command);
|
||||
}
|
||||
|
||||
public void unsubscribe(String channelName) throws IOException {
|
||||
if (closed.get()) throw new IOException("Connection closed!");
|
||||
|
||||
byte[] command = Util.combine(UNSUBSCRIBE_COMMAND, channelName.getBytes(), CRLF);
|
||||
outputStream.write(command);
|
||||
}
|
||||
|
||||
public PubSubReply read() throws IOException {
|
||||
if (closed.get()) throw new IOException("Connection closed!");
|
||||
|
||||
ArrayReplyHeader replyHeader = new ArrayReplyHeader(inputStream.readLine());
|
||||
|
||||
if (replyHeader.getElementCount() != 3) {
|
||||
throw new IOException("Received array reply header with strange count: " + replyHeader.getElementCount());
|
||||
}
|
||||
|
||||
StringReplyHeader replyTypeHeader = new StringReplyHeader(inputStream.readLine());
|
||||
byte[] replyType = inputStream.readFully(replyTypeHeader.getStringLength());
|
||||
inputStream.readLine();
|
||||
|
||||
if (Arrays.equals(SUBSCRIBE_TYPE, replyType)) return readSubscribeReply();
|
||||
else if (Arrays.equals(UNSUBSCRIBE_TYPE, replyType)) return readUnsubscribeReply();
|
||||
else if (Arrays.equals(MESSAGE_TYPE, replyType)) return readMessageReply();
|
||||
else throw new IOException("Unknown reply type: " + new String(replyType));
|
||||
}
|
||||
|
||||
public void close() {
|
||||
try {
|
||||
this.closed.set(true);
|
||||
this.inputStream.close();
|
||||
this.outputStream.close();
|
||||
this.socket.close();
|
||||
} catch (IOException e) {
|
||||
logger.warn("Exception while closing", e);
|
||||
}
|
||||
}
|
||||
|
||||
private PubSubReply readMessageReply() throws IOException {
|
||||
StringReplyHeader channelNameHeader = new StringReplyHeader(inputStream.readLine());
|
||||
byte[] channelName = inputStream.readFully(channelNameHeader.getStringLength());
|
||||
inputStream.readLine();
|
||||
|
||||
StringReplyHeader messageHeader = new StringReplyHeader(inputStream.readLine());
|
||||
byte[] message = inputStream.readFully(messageHeader.getStringLength());
|
||||
inputStream.readLine();
|
||||
|
||||
return new PubSubReply(PubSubReply.Type.MESSAGE, new String(channelName), Optional.of(message));
|
||||
}
|
||||
|
||||
private PubSubReply readUnsubscribeReply() throws IOException {
|
||||
String channelName = readSubscriptionReply();
|
||||
return new PubSubReply(PubSubReply.Type.UNSUBSCRIBE, channelName, Optional.empty());
|
||||
}
|
||||
|
||||
private PubSubReply readSubscribeReply() throws IOException {
|
||||
String channelName = readSubscriptionReply();
|
||||
return new PubSubReply(PubSubReply.Type.SUBSCRIBE, channelName, Optional.empty());
|
||||
}
|
||||
|
||||
private String readSubscriptionReply() throws IOException {
|
||||
StringReplyHeader channelNameHeader = new StringReplyHeader(inputStream.readLine());
|
||||
byte[] channelName = inputStream.readFully(channelNameHeader.getStringLength());
|
||||
inputStream.readLine();
|
||||
|
||||
IntReply subscriptionCount = new IntReply(inputStream.readLine());
|
||||
|
||||
return new String(channelName);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.redis;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
|
||||
public class PubSubReply {
|
||||
|
||||
public enum Type {
|
||||
MESSAGE,
|
||||
SUBSCRIBE,
|
||||
UNSUBSCRIBE
|
||||
}
|
||||
|
||||
private final Type type;
|
||||
private final String channel;
|
||||
private final Optional<byte[]> content;
|
||||
|
||||
public PubSubReply(Type type, String channel, Optional<byte[]> content) {
|
||||
this.type = type;
|
||||
this.channel = channel;
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getChannel() {
|
||||
return channel;
|
||||
}
|
||||
|
||||
public Optional<byte[]> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.redis.protocol;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class ArrayReplyHeader {
|
||||
|
||||
private final int elementCount;
|
||||
|
||||
public ArrayReplyHeader(String header) throws IOException {
|
||||
if (header == null || header.length() < 2 || header.charAt(0) != '*') {
|
||||
throw new IOException("Invalid array reply header: " + header);
|
||||
}
|
||||
|
||||
try {
|
||||
this.elementCount = Integer.parseInt(header.substring(1));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public int getElementCount() {
|
||||
return elementCount;
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.redis.protocol;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class IntReply {
|
||||
|
||||
private final int value;
|
||||
|
||||
public IntReply(String reply) throws IOException {
|
||||
if (reply == null || reply.length() < 2 || reply.charAt(0) != ':') {
|
||||
throw new IOException("Invalid int reply: " + reply);
|
||||
}
|
||||
|
||||
try {
|
||||
this.value = Integer.parseInt(reply.substring(1));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.redis.protocol;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class StringReplyHeader {
|
||||
|
||||
private final int stringLength;
|
||||
|
||||
public StringReplyHeader(String header) throws IOException {
|
||||
if (header == null || header.length() < 2 || header.charAt(0) != '$') {
|
||||
throw new IOException("Invalid string reply header: " + header);
|
||||
}
|
||||
|
||||
try {
|
||||
this.stringLength = Integer.parseInt(header.substring(1));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public int getStringLength() {
|
||||
return stringLength;
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.util;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class Util {
|
||||
|
||||
public static byte[] combine(byte[]... elements) {
|
||||
try {
|
||||
int sum = 0;
|
||||
|
||||
for (byte[] element : elements) {
|
||||
sum += element.length;
|
||||
}
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream(sum);
|
||||
|
||||
for (byte[] element : elements) {
|
||||
baos.write(element);
|
||||
}
|
||||
|
||||
return baos.toByteArray();
|
||||
} catch (IOException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void sleep(long millis) {
|
||||
try {
|
||||
Thread.sleep(millis);
|
||||
} catch (InterruptedException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExternalResource;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
import org.whispersystems.dispatch.io.RedisPubSubConnectionFactory;
|
||||
import org.whispersystems.dispatch.redis.PubSubConnection;
|
||||
import org.whispersystems.dispatch.redis.PubSubReply;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.mockito.Mockito.eq;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.timeout;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class DispatchManagerTest {
|
||||
|
||||
private PubSubConnection pubSubConnection;
|
||||
private RedisPubSubConnectionFactory socketFactory;
|
||||
private DispatchManager dispatchManager;
|
||||
private PubSubReplyInputStream pubSubReplyInputStream;
|
||||
|
||||
@Rule
|
||||
public ExternalResource resource = new ExternalResource() {
|
||||
@Override
|
||||
protected void before() throws Throwable {
|
||||
pubSubConnection = mock(PubSubConnection.class );
|
||||
socketFactory = mock(RedisPubSubConnectionFactory.class);
|
||||
pubSubReplyInputStream = new PubSubReplyInputStream();
|
||||
|
||||
when(socketFactory.connect()).thenReturn(pubSubConnection);
|
||||
when(pubSubConnection.read()).thenAnswer(new Answer<PubSubReply>() {
|
||||
@Override
|
||||
public PubSubReply answer(InvocationOnMock invocationOnMock) throws Throwable {
|
||||
return pubSubReplyInputStream.read();
|
||||
}
|
||||
});
|
||||
|
||||
dispatchManager = new DispatchManager(socketFactory, Optional.empty());
|
||||
dispatchManager.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void after() {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@Test
|
||||
public void testConnect() {
|
||||
verify(socketFactory).connect();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSubscribe() throws IOException {
|
||||
DispatchChannel dispatchChannel = mock(DispatchChannel.class);
|
||||
dispatchManager.subscribe("foo", dispatchChannel);
|
||||
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.SUBSCRIBE, "foo", Optional.empty()));
|
||||
|
||||
verify(dispatchChannel, timeout(1000)).onDispatchSubscribed(eq("foo"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSubscribeUnsubscribe() throws IOException {
|
||||
DispatchChannel dispatchChannel = mock(DispatchChannel.class);
|
||||
dispatchManager.subscribe("foo", dispatchChannel);
|
||||
dispatchManager.unsubscribe("foo", dispatchChannel);
|
||||
|
||||
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.SUBSCRIBE, "foo", Optional.empty()));
|
||||
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.UNSUBSCRIBE, "foo", Optional.empty()));
|
||||
|
||||
verify(dispatchChannel, timeout(1000)).onDispatchUnsubscribed(eq("foo"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMessages() throws IOException {
|
||||
DispatchChannel fooChannel = mock(DispatchChannel.class);
|
||||
DispatchChannel barChannel = mock(DispatchChannel.class);
|
||||
|
||||
dispatchManager.subscribe("foo", fooChannel);
|
||||
dispatchManager.subscribe("bar", barChannel);
|
||||
|
||||
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.SUBSCRIBE, "foo", Optional.empty()));
|
||||
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.SUBSCRIBE, "bar", Optional.empty()));
|
||||
|
||||
verify(fooChannel, timeout(1000)).onDispatchSubscribed(eq("foo"));
|
||||
verify(barChannel, timeout(1000)).onDispatchSubscribed(eq("bar"));
|
||||
|
||||
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.MESSAGE, "foo", Optional.of("hello".getBytes())));
|
||||
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.MESSAGE, "bar", Optional.of("there".getBytes())));
|
||||
|
||||
ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class);
|
||||
verify(fooChannel, timeout(1000)).onDispatchMessage(eq("foo"), captor.capture());
|
||||
|
||||
assertArrayEquals("hello".getBytes(), captor.getValue());
|
||||
|
||||
verify(barChannel, timeout(1000)).onDispatchMessage(eq("bar"), captor.capture());
|
||||
|
||||
assertArrayEquals("there".getBytes(), captor.getValue());
|
||||
}
|
||||
|
||||
private static class PubSubReplyInputStream {
|
||||
|
||||
private final List<PubSubReply> pubSubReplyList = new LinkedList<>();
|
||||
|
||||
public synchronized PubSubReply read() {
|
||||
try {
|
||||
while (pubSubReplyList.isEmpty()) wait();
|
||||
return pubSubReplyList.remove(0);
|
||||
} catch (InterruptedException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void write(PubSubReply pubSubReply) {
|
||||
pubSubReplyList.add(pubSubReply);
|
||||
notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
-265
@@ -1,265 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.redis;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.anyInt;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.Socket;
|
||||
import java.security.SecureRandom;
|
||||
import org.junit.Test;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
public class PubSubConnectionTest {
|
||||
|
||||
private static final String REPLY = "*3\r\n" +
|
||||
"$9\r\n" +
|
||||
"subscribe\r\n" +
|
||||
"$5\r\n" +
|
||||
"abcde\r\n" +
|
||||
":1\r\n" +
|
||||
"*3\r\n" +
|
||||
"$9\r\n" +
|
||||
"subscribe\r\n" +
|
||||
"$5\r\n" +
|
||||
"fghij\r\n" +
|
||||
":2\r\n" +
|
||||
"*3\r\n" +
|
||||
"$9\r\n" +
|
||||
"subscribe\r\n" +
|
||||
"$5\r\n" +
|
||||
"klmno\r\n" +
|
||||
":2\r\n" +
|
||||
"*3\r\n" +
|
||||
"$7\r\n" +
|
||||
"message\r\n" +
|
||||
"$5\r\n" +
|
||||
"abcde\r\n" +
|
||||
"$10\r\n" +
|
||||
"1234567890\r\n" +
|
||||
"*3\r\n" +
|
||||
"$7\r\n" +
|
||||
"message\r\n" +
|
||||
"$5\r\n" +
|
||||
"klmno\r\n" +
|
||||
"$10\r\n" +
|
||||
"0987654321\r\n";
|
||||
|
||||
|
||||
@Test
|
||||
public void testSubscribe() throws IOException {
|
||||
// ByteChannel byteChannel = mock(ByteChannel.class);
|
||||
OutputStream outputStream = mock(OutputStream.class);
|
||||
Socket socket = mock(Socket.class );
|
||||
when(socket.getOutputStream()).thenReturn(outputStream);
|
||||
PubSubConnection connection = new PubSubConnection(socket);
|
||||
|
||||
connection.subscribe("foobar");
|
||||
|
||||
ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class);
|
||||
verify(outputStream).write(captor.capture());
|
||||
|
||||
assertArrayEquals(captor.getValue(), "SUBSCRIBE foobar\r\n".getBytes());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnsubscribe() throws IOException {
|
||||
OutputStream outputStream = mock(OutputStream.class);
|
||||
Socket socket = mock(Socket.class );
|
||||
when(socket.getOutputStream()).thenReturn(outputStream);
|
||||
PubSubConnection connection = new PubSubConnection(socket);
|
||||
|
||||
connection.unsubscribe("bazbar");
|
||||
|
||||
ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class);
|
||||
verify(outputStream).write(captor.capture());
|
||||
|
||||
assertArrayEquals(captor.getValue(), "UNSUBSCRIBE bazbar\r\n".getBytes());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTricklyResponse() throws Exception {
|
||||
InputStream inputStream = mockInputStreamFor(new TrickleInputStream(REPLY.getBytes()));
|
||||
OutputStream outputStream = mock(OutputStream.class);
|
||||
Socket socket = mock(Socket.class );
|
||||
when(socket.getOutputStream()).thenReturn(outputStream);
|
||||
when(socket.getInputStream()).thenReturn(inputStream);
|
||||
|
||||
PubSubConnection pubSubConnection = new PubSubConnection(socket);
|
||||
readResponses(pubSubConnection);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFullResponse() throws Exception {
|
||||
InputStream inputStream = mockInputStreamFor(new FullInputStream(REPLY.getBytes()));
|
||||
OutputStream outputStream = mock(OutputStream.class);
|
||||
Socket socket = mock(Socket.class );
|
||||
when(socket.getOutputStream()).thenReturn(outputStream);
|
||||
when(socket.getInputStream()).thenReturn(inputStream);
|
||||
|
||||
PubSubConnection pubSubConnection = new PubSubConnection(socket);
|
||||
readResponses(pubSubConnection);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRandomLengthResponse() throws Exception {
|
||||
InputStream inputStream = mockInputStreamFor(new RandomInputStream(REPLY.getBytes()));
|
||||
OutputStream outputStream = mock(OutputStream.class);
|
||||
Socket socket = mock(Socket.class );
|
||||
when(socket.getOutputStream()).thenReturn(outputStream);
|
||||
when(socket.getInputStream()).thenReturn(inputStream);
|
||||
|
||||
PubSubConnection pubSubConnection = new PubSubConnection(socket);
|
||||
readResponses(pubSubConnection);
|
||||
}
|
||||
|
||||
private InputStream mockInputStreamFor(final MockInputStream stub) throws IOException {
|
||||
InputStream result = mock(InputStream.class);
|
||||
|
||||
when(result.read()).thenAnswer(new Answer<Integer>() {
|
||||
@Override
|
||||
public Integer answer(InvocationOnMock invocationOnMock) throws Throwable {
|
||||
return stub.read();
|
||||
}
|
||||
});
|
||||
|
||||
when(result.read(any(byte[].class))).thenAnswer(new Answer<Integer>() {
|
||||
@Override
|
||||
public Integer answer(InvocationOnMock invocationOnMock) throws Throwable {
|
||||
byte[] buffer = (byte[])invocationOnMock.getArguments()[0];
|
||||
return stub.read(buffer, 0, buffer.length);
|
||||
}
|
||||
});
|
||||
|
||||
when(result.read(any(byte[].class), anyInt(), anyInt())).thenAnswer(new Answer<Integer>() {
|
||||
@Override
|
||||
public Integer answer(InvocationOnMock invocationOnMock) throws Throwable {
|
||||
byte[] buffer = (byte[]) invocationOnMock.getArguments()[0];
|
||||
int offset = (int) invocationOnMock.getArguments()[1];
|
||||
int length = (int) invocationOnMock.getArguments()[2];
|
||||
|
||||
return stub.read(buffer, offset, length);
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void readResponses(PubSubConnection pubSubConnection) throws Exception {
|
||||
PubSubReply reply = pubSubConnection.read();
|
||||
|
||||
assertEquals(reply.getType(), PubSubReply.Type.SUBSCRIBE);
|
||||
assertEquals(reply.getChannel(), "abcde");
|
||||
assertFalse(reply.getContent().isPresent());
|
||||
|
||||
reply = pubSubConnection.read();
|
||||
|
||||
assertEquals(reply.getType(), PubSubReply.Type.SUBSCRIBE);
|
||||
assertEquals(reply.getChannel(), "fghij");
|
||||
assertFalse(reply.getContent().isPresent());
|
||||
|
||||
reply = pubSubConnection.read();
|
||||
|
||||
assertEquals(reply.getType(), PubSubReply.Type.SUBSCRIBE);
|
||||
assertEquals(reply.getChannel(), "klmno");
|
||||
assertFalse(reply.getContent().isPresent());
|
||||
|
||||
reply = pubSubConnection.read();
|
||||
|
||||
assertEquals(reply.getType(), PubSubReply.Type.MESSAGE);
|
||||
assertEquals(reply.getChannel(), "abcde");
|
||||
assertArrayEquals(reply.getContent().get(), "1234567890".getBytes());
|
||||
|
||||
reply = pubSubConnection.read();
|
||||
|
||||
assertEquals(reply.getType(), PubSubReply.Type.MESSAGE);
|
||||
assertEquals(reply.getChannel(), "klmno");
|
||||
assertArrayEquals(reply.getContent().get(), "0987654321".getBytes());
|
||||
}
|
||||
|
||||
private interface MockInputStream {
|
||||
public int read();
|
||||
public int read(byte[] input, int offset, int length);
|
||||
}
|
||||
|
||||
private static class TrickleInputStream implements MockInputStream {
|
||||
|
||||
private final byte[] data;
|
||||
private int index = 0;
|
||||
|
||||
private TrickleInputStream(byte[] data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int read() {
|
||||
return data[index++];
|
||||
}
|
||||
|
||||
public int read(byte[] input, int offset, int length) {
|
||||
input[offset] = data[index++];
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class FullInputStream implements MockInputStream {
|
||||
|
||||
private final byte[] data;
|
||||
private int index = 0;
|
||||
|
||||
private FullInputStream(byte[] data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int read() {
|
||||
return data[index++];
|
||||
}
|
||||
|
||||
public int read(byte[] input, int offset, int length) {
|
||||
int amount = Math.min(data.length - index, length);
|
||||
System.arraycopy(data, index, input, offset, amount);
|
||||
index += length;
|
||||
|
||||
return amount;
|
||||
}
|
||||
}
|
||||
|
||||
private static class RandomInputStream implements MockInputStream {
|
||||
private final byte[] data;
|
||||
private int index = 0;
|
||||
|
||||
private RandomInputStream(byte[] data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int read() {
|
||||
return data[index++];
|
||||
}
|
||||
|
||||
public int read(byte[] input, int offset, int length) {
|
||||
int maxCopy = Math.min(data.length - index, length);
|
||||
int randomCopy = new SecureRandom().nextInt(maxCopy) + 1;
|
||||
int copyAmount = Math.min(maxCopy, randomCopy);
|
||||
|
||||
System.arraycopy(data, index, input, offset, copyAmount);
|
||||
index += copyAmount;
|
||||
|
||||
return copyAmount;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.redis.protocol;
|
||||
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class ArrayReplyHeaderTest {
|
||||
|
||||
|
||||
@Test(expected = IOException.class)
|
||||
public void testNull() throws IOException {
|
||||
new ArrayReplyHeader(null);
|
||||
}
|
||||
|
||||
@Test(expected = IOException.class)
|
||||
public void testBadPrefix() throws IOException {
|
||||
new ArrayReplyHeader(":3");
|
||||
}
|
||||
|
||||
@Test(expected = IOException.class)
|
||||
public void testEmpty() throws IOException {
|
||||
new ArrayReplyHeader("");
|
||||
}
|
||||
|
||||
@Test(expected = IOException.class)
|
||||
public void testTruncated() throws IOException {
|
||||
new ArrayReplyHeader("*");
|
||||
}
|
||||
|
||||
@Test(expected = IOException.class)
|
||||
public void testBadNumber() throws IOException {
|
||||
new ArrayReplyHeader("*ABC");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValid() throws IOException {
|
||||
assertEquals(4, new ArrayReplyHeader("*4").getElementCount());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.redis.protocol;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class IntReplyHeaderTest {
|
||||
|
||||
@Test(expected = IOException.class)
|
||||
public void testNull() throws IOException {
|
||||
new IntReply(null);
|
||||
}
|
||||
|
||||
@Test(expected = IOException.class)
|
||||
public void testEmpty() throws IOException {
|
||||
new IntReply("");
|
||||
}
|
||||
|
||||
@Test(expected = IOException.class)
|
||||
public void testBadNumber() throws IOException {
|
||||
new IntReply(":A");
|
||||
}
|
||||
|
||||
@Test(expected = IOException.class)
|
||||
public void testBadFormat() throws IOException {
|
||||
new IntReply("*");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValid() throws IOException {
|
||||
assertEquals(23, new IntReply(":23").getValue());
|
||||
}
|
||||
}
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.dispatch.redis.protocol;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class StringReplyHeaderTest {
|
||||
|
||||
@Test
|
||||
public void testNull() {
|
||||
try {
|
||||
new StringReplyHeader(null);
|
||||
throw new AssertionError();
|
||||
} catch (IOException e) {
|
||||
// good
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBadNumber() {
|
||||
try {
|
||||
new StringReplyHeader("$100A");
|
||||
throw new AssertionError();
|
||||
} catch (IOException e) {
|
||||
// good
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBadPrefix() {
|
||||
try {
|
||||
new StringReplyHeader("*");
|
||||
throw new AssertionError();
|
||||
} catch (IOException e) {
|
||||
// good
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValid() throws IOException {
|
||||
assertEquals(1000, new StringReplyHeader("$1000").getStringLength());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
|
||||
<id>bin</id>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<formats>
|
||||
<format>tar.gz</format>
|
||||
</formats>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/config</directory>
|
||||
<outputDirectory>/config</outputDirectory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>${parent.artifactId}-${project.version}.jar</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
@@ -1,234 +0,0 @@
|
||||
twilio: # Twilio gateway configuration
|
||||
accountId:
|
||||
accountToken:
|
||||
nanpaMessagingServiceSid: # Twilio SID for the messaging service to use for NANPA.
|
||||
messagingServiceSid: # Twilio SID for the message service to use for non-NANPA.
|
||||
verifyServiceSid: # Twilio SID for a Verify service
|
||||
localDomain: # Domain Twilio can connect back to for calls. Should be domain of your service.
|
||||
defaultClientVerificationTexts:
|
||||
ios: # Text to use for the verification message on iOS. Will be passed to String.format with the verification code as argument 1.
|
||||
androidNg: # Text to use for the verification message on android-ng client types. Will be passed to String.format with the verification code as argument 1.
|
||||
android202001: # Text to use for the verification message on android-2020-01 client types. Will be passed to String.format with the verification code as argument 1.
|
||||
android202103: # Text to use for the verification message on android-2021-03 client types. Will be passed to String.format with the verification code as argument 1.
|
||||
generic: # Text to use when the client type is unrecognized. Will be passed to String.format with the verification code as argument 1.
|
||||
regionalClientVerificationTexts: # Map of country codes to custom texts
|
||||
999: # example country code
|
||||
ios:
|
||||
# … all keys from defaultClientVerificationTexts are required
|
||||
androidAppHash: # Hash appended to Android
|
||||
verifyServiceFriendlyName: # Service name used in template. Requires Twilio account rep to enable
|
||||
|
||||
push:
|
||||
queueSize: # Size of push pending queue
|
||||
|
||||
turn: # TURN server configuration
|
||||
secret: # TURN server secret
|
||||
uris:
|
||||
- stun:yourdomain:80
|
||||
- stun:yourdomain.com:443
|
||||
- turn:yourdomain:443?transport=udp
|
||||
- turn:etc.com:80?transport=udp
|
||||
|
||||
cacheCluster: # Redis server configuration for cache cluster
|
||||
urls:
|
||||
- redis://redis.example.com:6379/
|
||||
|
||||
clientPresenceCluster: # Redis server configuration for client presence cluster
|
||||
urls:
|
||||
- redis://redis.example.com:6379/
|
||||
|
||||
pubsub: # Redis server configuration for pubsub cluster
|
||||
url: redis://redis.example.com:6379/
|
||||
replicaUrls:
|
||||
- redis://redis.example.com:6379/
|
||||
|
||||
pushSchedulerCluster: # Redis server configuration for push scheduler cluster
|
||||
urls:
|
||||
- redis://redis.example.com:6379/
|
||||
|
||||
rateLimitersCluster: # Redis server configuration for rate limiters cluster
|
||||
urls:
|
||||
- redis://redis.example.com:6379/
|
||||
|
||||
directory:
|
||||
client: # Configuration for interfacing with Contact Discovery Service cluster
|
||||
userAuthenticationTokenSharedSecret: # hex-encoded secret shared with CDS used to generate auth tokens for Signal users
|
||||
userAuthenticationTokenUserIdSecret: # hex-encoded secret shared among Signal-Servers to obscure user phone numbers from CDS
|
||||
sqs:
|
||||
accessKey: # AWS SQS accessKey
|
||||
accessSecret: # AWS SQS accessSecret
|
||||
queueUrls: # AWS SQS queue urls
|
||||
- https://sqs.example.com/directory.fifo
|
||||
server: # One or more CDS servers
|
||||
- replicationName: # CDS replication name
|
||||
replicationUrl: # CDS replication endpoint base url
|
||||
replicationPassword: # CDS replication endpoint password
|
||||
replicationCaCertificate: # CDS replication endpoint TLS certificate trust root
|
||||
|
||||
messageCache: # Redis server configuration for message store cache
|
||||
persistDelayMinutes:
|
||||
|
||||
cluster:
|
||||
urls:
|
||||
- redis://redis.example.com:6379/
|
||||
|
||||
metricsCluster:
|
||||
urls:
|
||||
- redis://redis.example.com:6379/
|
||||
|
||||
messageDynamoDb: # DynamoDB table configuration
|
||||
region:
|
||||
tableName:
|
||||
|
||||
keysDynamoDb: # DynamoDB table configuration
|
||||
region:
|
||||
tableName:
|
||||
|
||||
accountsDynamoDb: # DynamoDB table configuration
|
||||
region:
|
||||
tableName:
|
||||
phoneNumberTableName:
|
||||
|
||||
migrationDeletedAccountsDynamoDb: # DynamoDB table configuration
|
||||
region:
|
||||
tableName:
|
||||
|
||||
migrationRetryAccountsDynamoDb: # DynamoDB table configuration
|
||||
region:
|
||||
tableName:
|
||||
|
||||
pushChallengeDynamoDb: # DynamoDB table configuration
|
||||
region:
|
||||
tableName:
|
||||
|
||||
reportMessageDynamoDb: # DynamoDB table configuration
|
||||
region:
|
||||
tableName:
|
||||
|
||||
awsAttachments: # AWS S3 configuration
|
||||
accessKey:
|
||||
accessSecret:
|
||||
bucket:
|
||||
region:
|
||||
|
||||
gcpAttachments: # GCP Storage configuration
|
||||
domain:
|
||||
email:
|
||||
maxSizeInBytes:
|
||||
pathPrefix:
|
||||
rsaSigningKey:
|
||||
|
||||
abuseDatabase: # Postgresql database configuration
|
||||
driverClass: org.postgresql.Driver
|
||||
user:
|
||||
password:
|
||||
url:
|
||||
|
||||
accountsDatabase: # Postgresql database configuration
|
||||
driverClass: org.postgresql.Driver
|
||||
user:
|
||||
password:
|
||||
url:
|
||||
|
||||
accountDatabaseCrawler:
|
||||
chunkSize: # accounts per run
|
||||
chunkIntervalMs: # time per run
|
||||
|
||||
apn: # Apple Push Notifications configuration
|
||||
sandbox: true
|
||||
bundleId:
|
||||
keyId:
|
||||
teamId:
|
||||
signingKey:
|
||||
|
||||
gcm: # GCM Configuration
|
||||
senderId:
|
||||
apiKey:
|
||||
|
||||
cdn:
|
||||
accessKey: # AWS Access Key ID
|
||||
accessSecret: # AWS Access Secret
|
||||
bucket: # S3 Bucket name
|
||||
region: # AWS region
|
||||
|
||||
wavefront: # Wavefront micrometer metrics config
|
||||
uri: # Wavefront proxy endpoint
|
||||
batchSize: # Number of measurements to send per request
|
||||
|
||||
datadog:
|
||||
apiKey:
|
||||
environment:
|
||||
|
||||
unidentifiedDelivery:
|
||||
certificate:
|
||||
privateKey:
|
||||
expiresDays:
|
||||
|
||||
voiceVerification:
|
||||
url: https://cdn-ca.signal.org/verification/
|
||||
locales:
|
||||
- en
|
||||
|
||||
recaptcha:
|
||||
secret:
|
||||
|
||||
storageService:
|
||||
uri:
|
||||
userAuthenticationTokenSharedSecret:
|
||||
storageCaCertificate:
|
||||
|
||||
backupService:
|
||||
uri:
|
||||
userAuthenticationTokenSharedSecret:
|
||||
backupCaCertificate:
|
||||
|
||||
zkConfig:
|
||||
serverPublic:
|
||||
serverSecret:
|
||||
enabled:
|
||||
|
||||
appConfig:
|
||||
application:
|
||||
environment:
|
||||
configuration:
|
||||
|
||||
remoteConfig:
|
||||
authorizedTokens:
|
||||
- # 1st authorized token
|
||||
- # 2nd authorized token
|
||||
- # ...
|
||||
- # Nth authorized token
|
||||
globalConfig: # keys and values that are given to clients on GET /v1/config
|
||||
|
||||
|
||||
paymentsService:
|
||||
userAuthenticationTokenSharedSecret: # hex-encoded 32-byte secret shared with MobileCoin services used to generate auth tokens for Signal users
|
||||
|
||||
torExitNodeList:
|
||||
s3Region:
|
||||
s3Bucket:
|
||||
objectKey:
|
||||
maxSize:
|
||||
|
||||
asnTable:
|
||||
s3Region:
|
||||
s3Bucket:
|
||||
objectKey:
|
||||
maxSize:
|
||||
|
||||
donation:
|
||||
uri: # value
|
||||
apiKey: # value
|
||||
supportedCurrencies:
|
||||
- # 1st supported currency
|
||||
- # 2nd supported currency
|
||||
- # ...
|
||||
- # Nth supported currency
|
||||
circuitBreaker:
|
||||
failureRateThreshold: # value
|
||||
ringBufferSizeInHalfOpenState: # value
|
||||
ringBufferSizeInClosedState: # value
|
||||
waitDurationInOpenStateInSeconds: # value
|
||||
retry:
|
||||
maxAttempts: # value
|
||||
waitDuration: # value
|
||||
-543
@@ -1,543 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>TextSecureServer</artifactId>
|
||||
<groupId>org.whispersystems.textsecure</groupId>
|
||||
<version>JGITVER</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>service</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.validation</groupId>
|
||||
<artifactId>jakarta.validation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.ws.rs</groupId>
|
||||
<artifactId>jakarta.ws.rs-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.whispersystems.textsecure</groupId>
|
||||
<artifactId>redis-dispatch</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.whispersystems.textsecure</groupId>
|
||||
<artifactId>websocket-resources</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.whispersystems.textsecure</groupId>
|
||||
<artifactId>gcm-sender-async</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.signal</groupId>
|
||||
<artifactId>zkgroup-java</artifactId>
|
||||
<version>0.7.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.whispersystems</groupId>
|
||||
<artifactId>curve25519-java</artifactId>
|
||||
<version>0.5.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-jdbi3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-auth</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-db</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-logging</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-metrics</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-util</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-servlets</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-lifecycle</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-jersey</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-jetty</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-migrations</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-access</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.logstash.logback</groupId>
|
||||
<artifactId>logstash-logback-encoder</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jdbi</groupId>
|
||||
<artifactId>jdbi3-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.liquibase</groupId>
|
||||
<artifactId>liquibase-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.dropwizard.metrics</groupId>
|
||||
<artifactId>metrics-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard.metrics</groupId>
|
||||
<artifactId>metrics-jdbi3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard.metrics</groupId>
|
||||
<artifactId>metrics-healthchecks</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard.metrics</groupId>
|
||||
<artifactId>metrics-annotation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.core</groupId>
|
||||
<artifactId>jersey-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.core</groupId>
|
||||
<artifactId>jersey-server</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.core</groupId>
|
||||
<artifactId>jersey-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.dropwizard</groupId>
|
||||
<artifactId>dropwizard-testing</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlets</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-csv</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.github.resilience4j</groupId>
|
||||
<artifactId>resilience4j-circuitbreaker</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.resilience4j</groupId>
|
||||
<artifactId>resilience4j-retry</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-registry-wavefront</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-registry-datadog</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.coursera</groupId>
|
||||
<artifactId>dropwizard-metrics-datadog</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-yaml</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.jaxrs</groupId>
|
||||
<artifactId>jackson-jaxrs-json-provider</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>software.amazon.awssdk</groupId>
|
||||
<artifactId>s3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>software.amazon.awssdk</groupId>
|
||||
<artifactId>dynamodb</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-s3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-sqs</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-appconfig</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.lettuce</groupId>
|
||||
<artifactId>lettuce-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.eatthepath</groupId>
|
||||
<artifactId>pushy</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.eatthepath</groupId>
|
||||
<artifactId>pushy-dropwizard-metrics-listener</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative-boringssl-static</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.vdurmont</groupId>
|
||||
<artifactId>semver4j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.googlecode.libphonenumber</groupId>
|
||||
<artifactId>libphonenumber</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.argparse4j</groupId>
|
||||
<artifactId>argparse4j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.test-framework</groupId>
|
||||
<artifactId>jersey-test-framework-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
|
||||
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.opentable.components</groupId>
|
||||
<artifactId>otj-pg-embedded</artifactId>
|
||||
<version>0.13.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.almworks.sqlite4java</groupId>
|
||||
<artifactId>sqlite4java</artifactId>
|
||||
<version>1.0.392</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.projectreactor</groupId>
|
||||
<artifactId>reactor-core</artifactId>
|
||||
<version>3.3.16.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.signal</groupId>
|
||||
<artifactId>embedded-redis</artifactId>
|
||||
<version>0.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.uuid</groupId>
|
||||
<artifactId>java-uuid-generator</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>DynamoDBLocal</artifactId>
|
||||
<version>1.13.6</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-runtime</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>pl.pragmatists</groupId>
|
||||
<artifactId>JUnitParams</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<finalName>${project.parent.artifactId}-${project.version}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.4</version>
|
||||
<configuration>
|
||||
<createDependencyReducedPom>true</createDependencyReducedPom>
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>*:*</artifact>
|
||||
<excludes>
|
||||
<exclude>META-INF/*.SF</exclude>
|
||||
<exclude>META-INF/*.DSA</exclude>
|
||||
<exclude>META-INF/*.RSA</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>org.whispersystems.textsecuregcm.WhisperServerService</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-assembly</id> <!-- this is used for inheritance merges -->
|
||||
<phase>package</phase> <!-- bind to the packaging phase -->
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>properties-maven-plugin</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>read-deploy-configuration</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>read-project-properties</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<files>${project.basedir}/config/deploy.properties</files>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.bazaarvoice.maven.plugins</groupId>
|
||||
<artifactId>s3-upload-maven-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<configuration>
|
||||
<source>${project.build.directory}/${project.build.finalName}-bin.tar.gz</source>
|
||||
<bucketName>${deploy.bucketName}</bucketName>
|
||||
<destination>${project.build.finalName}-bin.tar.gz</destination>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>deploy-to-s3</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>s3-upload</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>templating-maven-plugin</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>filter-src</id>
|
||||
<goals>
|
||||
<goal>filter-sources</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2021 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm;
|
||||
|
||||
public class WhisperServerVersion {
|
||||
|
||||
private static final String VERSION = "${project.version}";
|
||||
|
||||
public static String getServerVersion() {
|
||||
return VERSION;
|
||||
}
|
||||
}
|
||||
-479
@@ -1,479 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.textsecuregcm;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.dropwizard.Configuration;
|
||||
import io.dropwizard.client.JerseyClientConfiguration;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import org.whispersystems.textsecuregcm.configuration.AccountDatabaseCrawlerConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.AccountsDatabaseConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.AccountsDynamoDbConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.ApnConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.AppConfigConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.AwsAttachmentsConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.CdnConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.DatabaseConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.DatadogConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.DirectoryConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.DonationConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.DynamoDbConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.GcmConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.GcpAttachmentsConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.MaxDeviceConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.MessageCacheConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.MessageDynamoDbConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.WavefrontConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.PaymentsServiceConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.PushConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.RateLimitsConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.RecaptchaConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.RedisClusterConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.RedisConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.RemoteConfigConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.SecureBackupServiceConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.SecureStorageServiceConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.TestDeviceConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.MonitoredS3ObjectConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.TurnConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.TwilioConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.UnidentifiedDeliveryConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.VoiceVerificationConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.ZkConfig;
|
||||
import org.whispersystems.websocket.configuration.WebSocketConfiguration;
|
||||
|
||||
/** @noinspection MismatchedQueryAndUpdateOfCollection, WeakerAccess */
|
||||
public class WhisperServerConfiguration extends Configuration {
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private TwilioConfiguration twilio;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private PushConfiguration push;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private AwsAttachmentsConfiguration awsAttachments;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private GcpAttachmentsConfiguration gcpAttachments;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private CdnConfiguration cdn;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private WavefrontConfiguration wavefront;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private DatadogConfiguration datadog;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private RedisClusterConfiguration cacheCluster;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private RedisConfiguration pubsub;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private RedisClusterConfiguration metricsCluster;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private DirectoryConfiguration directory;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private AccountDatabaseCrawlerConfiguration accountDatabaseCrawler;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private RedisClusterConfiguration pushSchedulerCluster;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private RedisClusterConfiguration rateLimitersCluster;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private MessageCacheConfiguration messageCache;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@JsonProperty
|
||||
private RedisClusterConfiguration clientPresenceCluster;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private MessageDynamoDbConfiguration messageDynamoDb;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private DynamoDbConfiguration keysDynamoDb;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private AccountsDynamoDbConfiguration accountsDynamoDb;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private DynamoDbConfiguration migrationDeletedAccountsDynamoDb;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private DynamoDbConfiguration migrationRetryAccountsDynamoDb;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private DynamoDbConfiguration pushChallengeDynamoDb;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private DynamoDbConfiguration reportMessageDynamoDb;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private DatabaseConfiguration abuseDatabase;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private List<TestDeviceConfiguration> testDevices = new LinkedList<>();
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private List<MaxDeviceConfiguration> maxDevices = new LinkedList<>();
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private AccountsDatabaseConfiguration accountsDatabase;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private RateLimitsConfiguration limits = new RateLimitsConfiguration();
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private JerseyClientConfiguration httpClient = new JerseyClientConfiguration();
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private WebSocketConfiguration webSocket = new WebSocketConfiguration();
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private TurnConfiguration turn;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private GcmConfiguration gcm;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private ApnConfiguration apn;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private UnidentifiedDeliveryConfiguration unidentifiedDelivery;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private VoiceVerificationConfiguration voiceVerification;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private RecaptchaConfiguration recaptcha;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private SecureStorageServiceConfiguration storageService;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private SecureBackupServiceConfiguration backupService;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private PaymentsServiceConfiguration paymentsService;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private ZkConfig zkConfig;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private RemoteConfigConfiguration remoteConfig;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private AppConfigConfiguration appConfig;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private MonitoredS3ObjectConfiguration torExitNodeList;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private MonitoredS3ObjectConfiguration asnTable;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
private DonationConfiguration donation;
|
||||
|
||||
private Map<String, String> transparentDataIndex = new HashMap<>();
|
||||
|
||||
public RecaptchaConfiguration getRecaptchaConfiguration() {
|
||||
return recaptcha;
|
||||
}
|
||||
|
||||
public VoiceVerificationConfiguration getVoiceVerificationConfiguration() {
|
||||
return voiceVerification;
|
||||
}
|
||||
|
||||
public WebSocketConfiguration getWebSocketConfiguration() {
|
||||
return webSocket;
|
||||
}
|
||||
|
||||
public TwilioConfiguration getTwilioConfiguration() {
|
||||
return twilio;
|
||||
}
|
||||
|
||||
public PushConfiguration getPushConfiguration() {
|
||||
return push;
|
||||
}
|
||||
|
||||
public JerseyClientConfiguration getJerseyClientConfiguration() {
|
||||
return httpClient;
|
||||
}
|
||||
|
||||
public AwsAttachmentsConfiguration getAwsAttachmentsConfiguration() {
|
||||
return awsAttachments;
|
||||
}
|
||||
|
||||
public GcpAttachmentsConfiguration getGcpAttachmentsConfiguration() {
|
||||
return gcpAttachments;
|
||||
}
|
||||
|
||||
public RedisClusterConfiguration getCacheClusterConfiguration() {
|
||||
return cacheCluster;
|
||||
}
|
||||
|
||||
public RedisConfiguration getPubsubCacheConfiguration() {
|
||||
return pubsub;
|
||||
}
|
||||
|
||||
public RedisClusterConfiguration getMetricsClusterConfiguration() {
|
||||
return metricsCluster;
|
||||
}
|
||||
|
||||
public DirectoryConfiguration getDirectoryConfiguration() {
|
||||
return directory;
|
||||
}
|
||||
|
||||
public SecureStorageServiceConfiguration getSecureStorageServiceConfiguration() {
|
||||
return storageService;
|
||||
}
|
||||
|
||||
public AccountDatabaseCrawlerConfiguration getAccountDatabaseCrawlerConfiguration() {
|
||||
return accountDatabaseCrawler;
|
||||
}
|
||||
|
||||
public MessageCacheConfiguration getMessageCacheConfiguration() {
|
||||
return messageCache;
|
||||
}
|
||||
|
||||
public RedisClusterConfiguration getClientPresenceClusterConfiguration() {
|
||||
return clientPresenceCluster;
|
||||
}
|
||||
|
||||
public RedisClusterConfiguration getPushSchedulerCluster() {
|
||||
return pushSchedulerCluster;
|
||||
}
|
||||
|
||||
public RedisClusterConfiguration getRateLimitersCluster() {
|
||||
return rateLimitersCluster;
|
||||
}
|
||||
|
||||
public MessageDynamoDbConfiguration getMessageDynamoDbConfiguration() {
|
||||
return messageDynamoDb;
|
||||
}
|
||||
|
||||
public DynamoDbConfiguration getKeysDynamoDbConfiguration() {
|
||||
return keysDynamoDb;
|
||||
}
|
||||
|
||||
public AccountsDynamoDbConfiguration getAccountsDynamoDbConfiguration() {
|
||||
return accountsDynamoDb;
|
||||
}
|
||||
|
||||
public DynamoDbConfiguration getMigrationDeletedAccountsDynamoDbConfiguration() {
|
||||
return migrationDeletedAccountsDynamoDb;
|
||||
}
|
||||
|
||||
public DynamoDbConfiguration getMigrationRetryAccountsDynamoDbConfiguration() {
|
||||
return migrationRetryAccountsDynamoDb;
|
||||
}
|
||||
|
||||
public DatabaseConfiguration getAbuseDatabaseConfiguration() {
|
||||
return abuseDatabase;
|
||||
}
|
||||
|
||||
public AccountsDatabaseConfiguration getAccountsDatabaseConfiguration() {
|
||||
return accountsDatabase;
|
||||
}
|
||||
|
||||
public RateLimitsConfiguration getLimitsConfiguration() {
|
||||
return limits;
|
||||
}
|
||||
|
||||
public TurnConfiguration getTurnConfiguration() {
|
||||
return turn;
|
||||
}
|
||||
|
||||
public GcmConfiguration getGcmConfiguration() {
|
||||
return gcm;
|
||||
}
|
||||
|
||||
public ApnConfiguration getApnConfiguration() {
|
||||
return apn;
|
||||
}
|
||||
|
||||
public CdnConfiguration getCdnConfiguration() {
|
||||
return cdn;
|
||||
}
|
||||
|
||||
public WavefrontConfiguration getWavefrontConfiguration() {
|
||||
return wavefront;
|
||||
}
|
||||
|
||||
public DatadogConfiguration getDatadogConfiguration() {
|
||||
return datadog;
|
||||
}
|
||||
|
||||
public UnidentifiedDeliveryConfiguration getDeliveryCertificate() {
|
||||
return unidentifiedDelivery;
|
||||
}
|
||||
|
||||
public Map<String, Integer> getTestDevices() {
|
||||
Map<String, Integer> results = new HashMap<>();
|
||||
|
||||
for (TestDeviceConfiguration testDeviceConfiguration : testDevices) {
|
||||
results.put(testDeviceConfiguration.getNumber(),
|
||||
testDeviceConfiguration.getCode());
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
public Map<String, Integer> getMaxDevices() {
|
||||
Map<String, Integer> results = new HashMap<>();
|
||||
|
||||
for (MaxDeviceConfiguration maxDeviceConfiguration : maxDevices) {
|
||||
results.put(maxDeviceConfiguration.getNumber(),
|
||||
maxDeviceConfiguration.getCount());
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
public Map<String, String> getTransparentDataIndex() {
|
||||
return transparentDataIndex;
|
||||
}
|
||||
|
||||
public SecureBackupServiceConfiguration getSecureBackupServiceConfiguration() {
|
||||
return backupService;
|
||||
}
|
||||
|
||||
public PaymentsServiceConfiguration getPaymentsServiceConfiguration() {
|
||||
return paymentsService;
|
||||
}
|
||||
|
||||
public ZkConfig getZkConfig() {
|
||||
return zkConfig;
|
||||
}
|
||||
|
||||
public RemoteConfigConfiguration getRemoteConfigConfiguration() {
|
||||
return remoteConfig;
|
||||
}
|
||||
|
||||
public AppConfigConfiguration getAppConfig() {
|
||||
return appConfig;
|
||||
}
|
||||
|
||||
public DynamoDbConfiguration getPushChallengeDynamoDbConfiguration() {
|
||||
return pushChallengeDynamoDb;
|
||||
}
|
||||
|
||||
public DynamoDbConfiguration getReportMessageDynamoDbConfiguration() {
|
||||
return reportMessageDynamoDb;
|
||||
}
|
||||
|
||||
public MonitoredS3ObjectConfiguration getTorExitNodeListConfiguration() {
|
||||
return torExitNodeList;
|
||||
}
|
||||
|
||||
public MonitoredS3ObjectConfiguration getAsnTableConfiguration() {
|
||||
return asnTable;
|
||||
}
|
||||
|
||||
public DonationConfiguration getDonationConfiguration() {
|
||||
return donation;
|
||||
}
|
||||
}
|
||||
@@ -1,655 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.textsecuregcm;
|
||||
|
||||
import static com.codahale.metrics.MetricRegistry.name;
|
||||
|
||||
import com.amazonaws.auth.AWSCredentials;
|
||||
import com.amazonaws.auth.AWSCredentialsProvider;
|
||||
import com.amazonaws.auth.AWSStaticCredentialsProvider;
|
||||
import com.amazonaws.auth.BasicAWSCredentials;
|
||||
import com.amazonaws.services.s3.AmazonS3;
|
||||
import com.amazonaws.services.s3.AmazonS3Client;
|
||||
import com.codahale.metrics.SharedMetricRegistries;
|
||||
import com.codahale.metrics.jdbi3.strategies.DefaultNameStrategy;
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import io.dropwizard.Application;
|
||||
import io.dropwizard.auth.AuthFilter;
|
||||
import io.dropwizard.auth.PolymorphicAuthDynamicFeature;
|
||||
import io.dropwizard.auth.PolymorphicAuthValueFactoryProvider;
|
||||
import io.dropwizard.auth.basic.BasicCredentialAuthFilter;
|
||||
import io.dropwizard.auth.basic.BasicCredentials;
|
||||
import io.dropwizard.db.DataSourceFactory;
|
||||
import io.dropwizard.db.PooledDataSourceFactory;
|
||||
import io.dropwizard.jdbi3.JdbiFactory;
|
||||
import io.dropwizard.setup.Bootstrap;
|
||||
import io.dropwizard.setup.Environment;
|
||||
import io.lettuce.core.resource.ClientResources;
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.core.instrument.Meter.Id;
|
||||
import io.micrometer.core.instrument.Metrics;
|
||||
import io.micrometer.core.instrument.Tags;
|
||||
import io.micrometer.core.instrument.config.MeterFilter;
|
||||
import io.micrometer.core.instrument.distribution.DistributionStatisticConfig;
|
||||
import io.micrometer.datadog.DatadogConfig;
|
||||
import io.micrometer.datadog.DatadogMeterRegistry;
|
||||
import io.micrometer.wavefront.WavefrontConfig;
|
||||
import io.micrometer.wavefront.WavefrontMeterRegistry;
|
||||
import java.net.http.HttpClient;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.LinkedBlockingDeque;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.servlet.DispatcherType;
|
||||
import javax.servlet.FilterRegistration;
|
||||
import javax.servlet.ServletRegistration;
|
||||
import org.eclipse.jetty.servlets.CrossOriginFilter;
|
||||
import org.jdbi.v3.core.Jdbi;
|
||||
import org.signal.zkgroup.ServerSecretParams;
|
||||
import org.signal.zkgroup.auth.ServerZkAuthOperations;
|
||||
import org.signal.zkgroup.profiles.ServerZkProfileOperations;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.dispatch.DispatchManager;
|
||||
import org.whispersystems.textsecuregcm.auth.AccountAuthenticator;
|
||||
import org.whispersystems.textsecuregcm.auth.CertificateGenerator;
|
||||
import org.whispersystems.textsecuregcm.auth.DisabledPermittedAccount;
|
||||
import org.whispersystems.textsecuregcm.auth.DisabledPermittedAccountAuthenticator;
|
||||
import org.whispersystems.textsecuregcm.auth.ExternalServiceCredentialGenerator;
|
||||
import org.whispersystems.textsecuregcm.auth.TurnTokenGenerator;
|
||||
import org.whispersystems.textsecuregcm.configuration.DirectoryServerConfiguration;
|
||||
import org.whispersystems.textsecuregcm.controllers.AccountController;
|
||||
import org.whispersystems.textsecuregcm.controllers.AttachmentControllerV1;
|
||||
import org.whispersystems.textsecuregcm.controllers.AttachmentControllerV2;
|
||||
import org.whispersystems.textsecuregcm.controllers.AttachmentControllerV3;
|
||||
import org.whispersystems.textsecuregcm.controllers.CertificateController;
|
||||
import org.whispersystems.textsecuregcm.controllers.ChallengeController;
|
||||
import org.whispersystems.textsecuregcm.controllers.DeviceController;
|
||||
import org.whispersystems.textsecuregcm.controllers.DirectoryController;
|
||||
import org.whispersystems.textsecuregcm.controllers.DonationController;
|
||||
import org.whispersystems.textsecuregcm.controllers.KeepAliveController;
|
||||
import org.whispersystems.textsecuregcm.controllers.KeysController;
|
||||
import org.whispersystems.textsecuregcm.controllers.MessageController;
|
||||
import org.whispersystems.textsecuregcm.controllers.PaymentsController;
|
||||
import org.whispersystems.textsecuregcm.controllers.ProfileController;
|
||||
import org.whispersystems.textsecuregcm.controllers.ProvisioningController;
|
||||
import org.whispersystems.textsecuregcm.controllers.RemoteConfigController;
|
||||
import org.whispersystems.textsecuregcm.controllers.SecureBackupController;
|
||||
import org.whispersystems.textsecuregcm.controllers.SecureStorageController;
|
||||
import org.whispersystems.textsecuregcm.controllers.StickerController;
|
||||
import org.whispersystems.textsecuregcm.controllers.VoiceVerificationController;
|
||||
import org.whispersystems.textsecuregcm.currency.CurrencyConversionManager;
|
||||
import org.whispersystems.textsecuregcm.currency.FixerClient;
|
||||
import org.whispersystems.textsecuregcm.currency.FtxClient;
|
||||
import org.whispersystems.textsecuregcm.experiment.ExperimentEnrollmentManager;
|
||||
import org.whispersystems.textsecuregcm.filters.RemoteDeprecationFilter;
|
||||
import org.whispersystems.textsecuregcm.filters.TimestampResponseFilter;
|
||||
import org.whispersystems.textsecuregcm.limits.PreKeyRateLimiter;
|
||||
import org.whispersystems.textsecuregcm.limits.PushChallengeManager;
|
||||
import org.whispersystems.textsecuregcm.limits.RateLimitChallengeManager;
|
||||
import org.whispersystems.textsecuregcm.limits.RateLimitResetMetricsManager;
|
||||
import org.whispersystems.textsecuregcm.limits.RateLimiters;
|
||||
import org.whispersystems.textsecuregcm.limits.UnsealedSenderRateLimiter;
|
||||
import org.whispersystems.textsecuregcm.liquibase.NameableMigrationsBundle;
|
||||
import org.whispersystems.textsecuregcm.mappers.DeviceLimitExceededExceptionMapper;
|
||||
import org.whispersystems.textsecuregcm.mappers.IOExceptionMapper;
|
||||
import org.whispersystems.textsecuregcm.mappers.InvalidWebsocketAddressExceptionMapper;
|
||||
import org.whispersystems.textsecuregcm.mappers.RateLimitChallengeExceptionMapper;
|
||||
import org.whispersystems.textsecuregcm.mappers.RateLimitExceededExceptionMapper;
|
||||
import org.whispersystems.textsecuregcm.mappers.RetryLaterExceptionMapper;
|
||||
import org.whispersystems.textsecuregcm.metrics.BufferPoolGauges;
|
||||
import org.whispersystems.textsecuregcm.metrics.CpuUsageGauge;
|
||||
import org.whispersystems.textsecuregcm.metrics.FileDescriptorGauge;
|
||||
import org.whispersystems.textsecuregcm.metrics.FreeMemoryGauge;
|
||||
import org.whispersystems.textsecuregcm.metrics.GarbageCollectionGauges;
|
||||
import org.whispersystems.textsecuregcm.metrics.MaxFileDescriptorGauge;
|
||||
import org.whispersystems.textsecuregcm.metrics.MetricsApplicationEventListener;
|
||||
import org.whispersystems.textsecuregcm.metrics.MetricsRequestEventListener;
|
||||
import org.whispersystems.textsecuregcm.metrics.NetworkReceivedGauge;
|
||||
import org.whispersystems.textsecuregcm.metrics.NetworkSentGauge;
|
||||
import org.whispersystems.textsecuregcm.metrics.OperatingSystemMemoryGauge;
|
||||
import org.whispersystems.textsecuregcm.metrics.PushLatencyManager;
|
||||
import org.whispersystems.textsecuregcm.metrics.TrafficSource;
|
||||
import org.whispersystems.textsecuregcm.providers.MultiRecipientMessageProvider;
|
||||
import org.whispersystems.textsecuregcm.providers.RedisClientFactory;
|
||||
import org.whispersystems.textsecuregcm.providers.RedisClusterHealthCheck;
|
||||
import org.whispersystems.textsecuregcm.push.APNSender;
|
||||
import org.whispersystems.textsecuregcm.push.ApnFallbackManager;
|
||||
import org.whispersystems.textsecuregcm.push.ClientPresenceManager;
|
||||
import org.whispersystems.textsecuregcm.push.GCMSender;
|
||||
import org.whispersystems.textsecuregcm.push.MessageSender;
|
||||
import org.whispersystems.textsecuregcm.push.ProvisioningManager;
|
||||
import org.whispersystems.textsecuregcm.push.ReceiptSender;
|
||||
import org.whispersystems.textsecuregcm.recaptcha.RecaptchaClient;
|
||||
import org.whispersystems.textsecuregcm.redis.ConnectionEventLogger;
|
||||
import org.whispersystems.textsecuregcm.redis.FaultTolerantRedisCluster;
|
||||
import org.whispersystems.textsecuregcm.redis.ReplicatedJedisPool;
|
||||
import org.whispersystems.textsecuregcm.s3.PolicySigner;
|
||||
import org.whispersystems.textsecuregcm.s3.PostPolicyGenerator;
|
||||
import org.whispersystems.textsecuregcm.securebackup.SecureBackupClient;
|
||||
import org.whispersystems.textsecuregcm.securestorage.SecureStorageClient;
|
||||
import org.whispersystems.textsecuregcm.sms.SmsSender;
|
||||
import org.whispersystems.textsecuregcm.sms.TwilioSmsSender;
|
||||
import org.whispersystems.textsecuregcm.sms.TwilioVerifyExperimentEnrollmentManager;
|
||||
import org.whispersystems.textsecuregcm.sqs.DirectoryQueue;
|
||||
import org.whispersystems.textsecuregcm.storage.AbusiveHostRules;
|
||||
import org.whispersystems.textsecuregcm.storage.Account;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountCleaner;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountDatabaseCrawler;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountDatabaseCrawlerCache;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountDatabaseCrawlerListener;
|
||||
import org.whispersystems.textsecuregcm.storage.Accounts;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountsDynamoDb;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountsDynamoDbMigrator;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountsManager;
|
||||
import org.whispersystems.textsecuregcm.storage.ActiveUserCounter;
|
||||
import org.whispersystems.textsecuregcm.storage.DirectoryReconciler;
|
||||
import org.whispersystems.textsecuregcm.storage.DirectoryReconciliationClient;
|
||||
import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager;
|
||||
import org.whispersystems.textsecuregcm.storage.FaultTolerantDatabase;
|
||||
import org.whispersystems.textsecuregcm.storage.KeysDynamoDb;
|
||||
import org.whispersystems.textsecuregcm.storage.MessagePersister;
|
||||
import org.whispersystems.textsecuregcm.storage.MessagesCache;
|
||||
import org.whispersystems.textsecuregcm.storage.MessagesDynamoDb;
|
||||
import org.whispersystems.textsecuregcm.storage.MessagesManager;
|
||||
import org.whispersystems.textsecuregcm.storage.MigrationDeletedAccounts;
|
||||
import org.whispersystems.textsecuregcm.storage.MigrationRetryAccounts;
|
||||
import org.whispersystems.textsecuregcm.storage.PendingAccounts;
|
||||
import org.whispersystems.textsecuregcm.storage.PendingAccountsManager;
|
||||
import org.whispersystems.textsecuregcm.storage.PendingDevices;
|
||||
import org.whispersystems.textsecuregcm.storage.PendingDevicesManager;
|
||||
import org.whispersystems.textsecuregcm.storage.Profiles;
|
||||
import org.whispersystems.textsecuregcm.storage.ProfilesManager;
|
||||
import org.whispersystems.textsecuregcm.storage.PubSubManager;
|
||||
import org.whispersystems.textsecuregcm.storage.PushChallengeDynamoDb;
|
||||
import org.whispersystems.textsecuregcm.storage.PushFeedbackProcessor;
|
||||
import org.whispersystems.textsecuregcm.storage.RegistrationLockVersionCounter;
|
||||
import org.whispersystems.textsecuregcm.storage.RemoteConfigs;
|
||||
import org.whispersystems.textsecuregcm.storage.RemoteConfigsManager;
|
||||
import org.whispersystems.textsecuregcm.storage.ReportMessageDynamoDb;
|
||||
import org.whispersystems.textsecuregcm.storage.ReportMessageManager;
|
||||
import org.whispersystems.textsecuregcm.storage.ReservedUsernames;
|
||||
import org.whispersystems.textsecuregcm.storage.Usernames;
|
||||
import org.whispersystems.textsecuregcm.storage.UsernamesManager;
|
||||
import org.whispersystems.textsecuregcm.util.AsnManager;
|
||||
import org.whispersystems.textsecuregcm.util.Constants;
|
||||
import org.whispersystems.textsecuregcm.util.DynamoDbFromConfig;
|
||||
import org.whispersystems.textsecuregcm.util.HostnameUtil;
|
||||
import org.whispersystems.textsecuregcm.util.TorExitNodeManager;
|
||||
import org.whispersystems.textsecuregcm.websocket.AuthenticatedConnectListener;
|
||||
import org.whispersystems.textsecuregcm.websocket.DeadLetterHandler;
|
||||
import org.whispersystems.textsecuregcm.websocket.ProvisioningConnectListener;
|
||||
import org.whispersystems.textsecuregcm.websocket.WebSocketAccountAuthenticator;
|
||||
import org.whispersystems.textsecuregcm.workers.CertificateCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.CheckDynamicConfigurationCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.DeleteUserCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.ServerVersionCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.SetCrawlerAccelerationTask;
|
||||
import org.whispersystems.textsecuregcm.workers.SetRequestLoggingEnabledTask;
|
||||
import org.whispersystems.textsecuregcm.workers.VacuumCommand;
|
||||
import org.whispersystems.textsecuregcm.workers.ZkParamsCommand;
|
||||
import org.whispersystems.websocket.WebSocketResourceProviderFactory;
|
||||
import org.whispersystems.websocket.setup.WebSocketEnvironment;
|
||||
import software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient;
|
||||
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
|
||||
|
||||
public class WhisperServerService extends Application<WhisperServerConfiguration> {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(WhisperServerService.class);
|
||||
|
||||
@Override
|
||||
public void initialize(Bootstrap<WhisperServerConfiguration> bootstrap) {
|
||||
bootstrap.addCommand(new VacuumCommand());
|
||||
bootstrap.addCommand(new DeleteUserCommand());
|
||||
bootstrap.addCommand(new CertificateCommand());
|
||||
bootstrap.addCommand(new ZkParamsCommand());
|
||||
bootstrap.addCommand(new ServerVersionCommand());
|
||||
bootstrap.addCommand(new CheckDynamicConfigurationCommand());
|
||||
|
||||
bootstrap.addBundle(new NameableMigrationsBundle<WhisperServerConfiguration>("accountdb", "accountsdb.xml") {
|
||||
@Override
|
||||
public DataSourceFactory getDataSourceFactory(WhisperServerConfiguration configuration) {
|
||||
return configuration.getAccountsDatabaseConfiguration();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
bootstrap.addBundle(new NameableMigrationsBundle<WhisperServerConfiguration>("abusedb", "abusedb.xml") {
|
||||
@Override
|
||||
public PooledDataSourceFactory getDataSourceFactory(WhisperServerConfiguration configuration) {
|
||||
return configuration.getAbuseDatabaseConfiguration();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "whisper-server";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(WhisperServerConfiguration config, Environment environment)
|
||||
throws Exception {
|
||||
|
||||
SharedMetricRegistries.add(Constants.METRICS_NAME, environment.metrics());
|
||||
|
||||
final DistributionStatisticConfig defaultDistributionStatisticConfig = DistributionStatisticConfig.builder()
|
||||
.percentiles(.75, .95, .99, .999)
|
||||
.build();
|
||||
|
||||
final WavefrontConfig wavefrontConfig = new WavefrontConfig() {
|
||||
@Override
|
||||
public String get(final String key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String uri() {
|
||||
return config.getWavefrontConfiguration().getUri();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchSize() {
|
||||
return config.getWavefrontConfiguration().getBatchSize();
|
||||
}
|
||||
};
|
||||
|
||||
Metrics.addRegistry(new WavefrontMeterRegistry(wavefrontConfig, Clock.SYSTEM) {
|
||||
@Override
|
||||
protected DistributionStatisticConfig defaultHistogramConfig() {
|
||||
return defaultDistributionStatisticConfig.merge(super.defaultHistogramConfig());
|
||||
}
|
||||
});
|
||||
|
||||
{
|
||||
final DatadogMeterRegistry datadogMeterRegistry = new DatadogMeterRegistry(new DatadogConfig() {
|
||||
@Override
|
||||
public String get(final String key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String apiKey() {
|
||||
return config.getDatadogConfiguration().getApiKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Duration step() {
|
||||
return config.getDatadogConfiguration().getStep();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String hostTag() {
|
||||
return "host";
|
||||
}
|
||||
}, Clock.SYSTEM);
|
||||
|
||||
datadogMeterRegistry.config().commonTags(
|
||||
Tags.of(
|
||||
"service", "chat",
|
||||
"host", HostnameUtil.getLocalHostname(),
|
||||
"version", WhisperServerVersion.getServerVersion(),
|
||||
"env", config.getDatadogConfiguration().getEnvironment()))
|
||||
.meterFilter(MeterFilter.denyNameStartsWith(MetricsRequestEventListener.REQUEST_COUNTER_NAME))
|
||||
.meterFilter(MeterFilter.denyNameStartsWith(MetricsRequestEventListener.ANDROID_REQUEST_COUNTER_NAME))
|
||||
.meterFilter(MeterFilter.denyNameStartsWith(MetricsRequestEventListener.DESKTOP_REQUEST_COUNTER_NAME))
|
||||
.meterFilter(MeterFilter.denyNameStartsWith(MetricsRequestEventListener.IOS_REQUEST_COUNTER_NAME))
|
||||
.meterFilter(new MeterFilter() {
|
||||
@Override
|
||||
public DistributionStatisticConfig configure(final Id id, final DistributionStatisticConfig config) {
|
||||
return defaultDistributionStatisticConfig.merge(config);
|
||||
}
|
||||
});
|
||||
|
||||
Metrics.addRegistry(datadogMeterRegistry);
|
||||
}
|
||||
|
||||
environment.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
environment.getObjectMapper().setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE);
|
||||
environment.getObjectMapper().setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
|
||||
|
||||
JdbiFactory jdbiFactory = new JdbiFactory(DefaultNameStrategy.CHECK_EMPTY);
|
||||
Jdbi accountJdbi = jdbiFactory.build(environment, config.getAccountsDatabaseConfiguration(), "accountdb");
|
||||
Jdbi abuseJdbi = jdbiFactory.build(environment, config.getAbuseDatabaseConfiguration(), "abusedb" );
|
||||
|
||||
FaultTolerantDatabase accountDatabase = new FaultTolerantDatabase("accounts_database", accountJdbi, config.getAccountsDatabaseConfiguration().getCircuitBreakerConfiguration());
|
||||
FaultTolerantDatabase abuseDatabase = new FaultTolerantDatabase("abuse_database", abuseJdbi, config.getAbuseDatabaseConfiguration().getCircuitBreakerConfiguration());
|
||||
|
||||
DynamoDbClient messageDynamoDb = DynamoDbFromConfig.client(config.getMessageDynamoDbConfiguration(),
|
||||
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
|
||||
|
||||
DynamoDbClient preKeyDynamoDb = DynamoDbFromConfig.client(config.getKeysDynamoDbConfiguration(),
|
||||
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
|
||||
|
||||
DynamoDbClient accountsDynamoDbClient = DynamoDbFromConfig.client(config.getAccountsDynamoDbConfiguration(),
|
||||
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
|
||||
|
||||
// The thread pool core & max sizes are set via dynamic configuration within AccountsDynamoDb
|
||||
ThreadPoolExecutor accountsDynamoDbMigrationThreadPool = new ThreadPoolExecutor(1, 1, 0, TimeUnit.SECONDS,
|
||||
new LinkedBlockingDeque<>());
|
||||
|
||||
DynamoDbAsyncClient accountsDynamoDbAsyncClient = DynamoDbFromConfig.asyncClient(config.getAccountsDynamoDbConfiguration(),
|
||||
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create(),
|
||||
accountsDynamoDbMigrationThreadPool);
|
||||
|
||||
DynamoDbClient recentlyDeletedAccountsDynamoDb = DynamoDbFromConfig.client(config.getMigrationDeletedAccountsDynamoDbConfiguration(),
|
||||
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
|
||||
|
||||
DynamoDbClient pushChallengeDynamoDbClient = DynamoDbFromConfig.client(config.getPushChallengeDynamoDbConfiguration(),
|
||||
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
|
||||
|
||||
DynamoDbClient reportMessageDynamoDbClient = DynamoDbFromConfig.client(config.getReportMessageDynamoDbConfiguration(),
|
||||
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
|
||||
|
||||
DynamoDbClient migrationRetryAccountsDynamoDb = DynamoDbFromConfig.client(config.getMigrationRetryAccountsDynamoDbConfiguration(),
|
||||
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
|
||||
|
||||
MigrationDeletedAccounts migrationDeletedAccounts = new MigrationDeletedAccounts(recentlyDeletedAccountsDynamoDb, config.getMigrationDeletedAccountsDynamoDbConfiguration().getTableName());
|
||||
MigrationRetryAccounts migrationRetryAccounts = new MigrationRetryAccounts(migrationRetryAccountsDynamoDb, config.getMigrationRetryAccountsDynamoDbConfiguration().getTableName());
|
||||
|
||||
Accounts accounts = new Accounts(accountDatabase);
|
||||
AccountsDynamoDb accountsDynamoDb = new AccountsDynamoDb(accountsDynamoDbClient, accountsDynamoDbAsyncClient, accountsDynamoDbMigrationThreadPool, config.getAccountsDynamoDbConfiguration().getTableName(), config.getAccountsDynamoDbConfiguration().getPhoneNumberTableName(), migrationDeletedAccounts, migrationRetryAccounts);
|
||||
PendingAccounts pendingAccounts = new PendingAccounts(accountDatabase);
|
||||
PendingDevices pendingDevices = new PendingDevices (accountDatabase);
|
||||
Usernames usernames = new Usernames(accountDatabase);
|
||||
ReservedUsernames reservedUsernames = new ReservedUsernames(accountDatabase);
|
||||
Profiles profiles = new Profiles(accountDatabase);
|
||||
KeysDynamoDb keysDynamoDb = new KeysDynamoDb(preKeyDynamoDb, config.getKeysDynamoDbConfiguration().getTableName());
|
||||
MessagesDynamoDb messagesDynamoDb = new MessagesDynamoDb(messageDynamoDb, config.getMessageDynamoDbConfiguration().getTableName(), config.getMessageDynamoDbConfiguration().getTimeToLive());
|
||||
AbusiveHostRules abusiveHostRules = new AbusiveHostRules(abuseDatabase);
|
||||
RemoteConfigs remoteConfigs = new RemoteConfigs(accountDatabase);
|
||||
PushChallengeDynamoDb pushChallengeDynamoDb = new PushChallengeDynamoDb(pushChallengeDynamoDbClient, config.getPushChallengeDynamoDbConfiguration().getTableName());
|
||||
ReportMessageDynamoDb reportMessageDynamoDb = new ReportMessageDynamoDb(reportMessageDynamoDbClient, config.getReportMessageDynamoDbConfiguration().getTableName());
|
||||
|
||||
RedisClientFactory pubSubClientFactory = new RedisClientFactory("pubsub_cache", config.getPubsubCacheConfiguration().getUrl(), config.getPubsubCacheConfiguration().getReplicaUrls(), config.getPubsubCacheConfiguration().getCircuitBreakerConfiguration());
|
||||
ReplicatedJedisPool pubsubClient = pubSubClientFactory.getRedisClientPool();
|
||||
|
||||
ClientResources generalCacheClientResources = ClientResources.builder().build();
|
||||
ClientResources messageCacheClientResources = ClientResources.builder().build();
|
||||
ClientResources presenceClientResources = ClientResources.builder().build();
|
||||
ClientResources metricsCacheClientResources = ClientResources.builder().build();
|
||||
ClientResources pushSchedulerCacheClientResources = ClientResources.builder().ioThreadPoolSize(4).build();
|
||||
ClientResources rateLimitersCacheClientResources = ClientResources.builder().build();
|
||||
|
||||
ConnectionEventLogger.logConnectionEvents(generalCacheClientResources);
|
||||
ConnectionEventLogger.logConnectionEvents(messageCacheClientResources);
|
||||
ConnectionEventLogger.logConnectionEvents(presenceClientResources);
|
||||
ConnectionEventLogger.logConnectionEvents(metricsCacheClientResources);
|
||||
|
||||
FaultTolerantRedisCluster cacheCluster = new FaultTolerantRedisCluster("main_cache_cluster", config.getCacheClusterConfiguration(), generalCacheClientResources);
|
||||
FaultTolerantRedisCluster messagesCluster = new FaultTolerantRedisCluster("messages_cluster", config.getMessageCacheConfiguration().getRedisClusterConfiguration(), messageCacheClientResources);
|
||||
FaultTolerantRedisCluster clientPresenceCluster = new FaultTolerantRedisCluster("client_presence_cluster", config.getClientPresenceClusterConfiguration(), presenceClientResources);
|
||||
FaultTolerantRedisCluster metricsCluster = new FaultTolerantRedisCluster("metrics_cluster", config.getMetricsClusterConfiguration(), metricsCacheClientResources);
|
||||
FaultTolerantRedisCluster pushSchedulerCluster = new FaultTolerantRedisCluster("push_scheduler", config.getPushSchedulerCluster(), pushSchedulerCacheClientResources);
|
||||
FaultTolerantRedisCluster rateLimitersCluster = new FaultTolerantRedisCluster("rate_limiters", config.getRateLimitersCluster(), rateLimitersCacheClientResources);
|
||||
|
||||
BlockingQueue<Runnable> keyspaceNotificationDispatchQueue = new ArrayBlockingQueue<>(10_000);
|
||||
Metrics.gaugeCollectionSize(name(getClass(), "keyspaceNotificationDispatchQueueSize"), Collections.emptyList(), keyspaceNotificationDispatchQueue);
|
||||
|
||||
ScheduledExecutorService recurringJobExecutor = environment.lifecycle().scheduledExecutorService(name(getClass(), "recurringJob-%d")).threads(2).build();
|
||||
ScheduledExecutorService declinedMessageReceiptExecutor = environment.lifecycle().scheduledExecutorService(name(getClass(), "declined-receipt-%d")).threads(2).build();
|
||||
ScheduledExecutorService retrySchedulingExecutor = environment.lifecycle().scheduledExecutorService(name(getClass(), "retry-%d")).threads(2).build();
|
||||
ExecutorService keyspaceNotificationDispatchExecutor = environment.lifecycle().executorService(name(getClass(), "keyspaceNotification-%d")).maxThreads(16).workQueue(keyspaceNotificationDispatchQueue).build();
|
||||
ExecutorService apnSenderExecutor = environment.lifecycle().executorService(name(getClass(), "apnSender-%d")).maxThreads(1).minThreads(1).build();
|
||||
ExecutorService gcmSenderExecutor = environment.lifecycle().executorService(name(getClass(), "gcmSender-%d")).maxThreads(1).minThreads(1).build();
|
||||
ExecutorService backupServiceExecutor = environment.lifecycle().executorService(name(getClass(), "backupService-%d")).maxThreads(1).minThreads(1).build();
|
||||
ExecutorService storageServiceExecutor = environment.lifecycle().executorService(name(getClass(), "storageService-%d")).maxThreads(1).minThreads(1).build();
|
||||
ExecutorService donationExecutor = environment.lifecycle().executorService(name(getClass(), "donation-%d")).maxThreads(1).minThreads(1).build();
|
||||
|
||||
ExternalServiceCredentialGenerator directoryCredentialsGenerator = new ExternalServiceCredentialGenerator(config.getDirectoryConfiguration().getDirectoryClientConfiguration().getUserAuthenticationTokenSharedSecret(),
|
||||
config.getDirectoryConfiguration().getDirectoryClientConfiguration().getUserAuthenticationTokenUserIdSecret(),
|
||||
true);
|
||||
|
||||
DynamicConfigurationManager dynamicConfigurationManager = new DynamicConfigurationManager(config.getAppConfig().getApplication(), config.getAppConfig().getEnvironment(), config.getAppConfig().getConfigurationName());
|
||||
dynamicConfigurationManager.start();
|
||||
|
||||
ExperimentEnrollmentManager experimentEnrollmentManager = new ExperimentEnrollmentManager(dynamicConfigurationManager);
|
||||
|
||||
TwilioVerifyExperimentEnrollmentManager verifyExperimentEnrollmentManager = new TwilioVerifyExperimentEnrollmentManager(
|
||||
config.getVoiceVerificationConfiguration(), experimentEnrollmentManager);
|
||||
|
||||
ExternalServiceCredentialGenerator storageCredentialsGenerator = new ExternalServiceCredentialGenerator(config.getSecureStorageServiceConfiguration().getUserAuthenticationTokenSharedSecret(), new byte[0], false);
|
||||
ExternalServiceCredentialGenerator backupCredentialsGenerator = new ExternalServiceCredentialGenerator(config.getSecureBackupServiceConfiguration().getUserAuthenticationTokenSharedSecret(), new byte[0], false);
|
||||
ExternalServiceCredentialGenerator paymentsCredentialsGenerator = new ExternalServiceCredentialGenerator(config.getPaymentsServiceConfiguration().getUserAuthenticationTokenSharedSecret(), new byte[0], false);
|
||||
|
||||
SecureBackupClient secureBackupClient = new SecureBackupClient(backupCredentialsGenerator, backupServiceExecutor, config.getSecureBackupServiceConfiguration());
|
||||
SecureStorageClient secureStorageClient = new SecureStorageClient(storageCredentialsGenerator, storageServiceExecutor, config.getSecureStorageServiceConfiguration());
|
||||
ClientPresenceManager clientPresenceManager = new ClientPresenceManager(clientPresenceCluster, recurringJobExecutor, keyspaceNotificationDispatchExecutor);
|
||||
DirectoryQueue directoryQueue = new DirectoryQueue(config.getDirectoryConfiguration().getSqsConfiguration());
|
||||
PendingAccountsManager pendingAccountsManager = new PendingAccountsManager(pendingAccounts, cacheCluster);
|
||||
PendingDevicesManager pendingDevicesManager = new PendingDevicesManager(pendingDevices, cacheCluster);
|
||||
UsernamesManager usernamesManager = new UsernamesManager(usernames, reservedUsernames, cacheCluster);
|
||||
ProfilesManager profilesManager = new ProfilesManager(profiles, cacheCluster);
|
||||
MessagesCache messagesCache = new MessagesCache(messagesCluster, messagesCluster, keyspaceNotificationDispatchExecutor);
|
||||
PushLatencyManager pushLatencyManager = new PushLatencyManager(metricsCluster);
|
||||
ReportMessageManager reportMessageManager = new ReportMessageManager(reportMessageDynamoDb, Metrics.globalRegistry);
|
||||
MessagesManager messagesManager = new MessagesManager(messagesDynamoDb, messagesCache, pushLatencyManager, reportMessageManager);
|
||||
AccountsManager accountsManager = new AccountsManager(accounts, accountsDynamoDb, cacheCluster, directoryQueue, keysDynamoDb, messagesManager, usernamesManager, profilesManager, secureStorageClient, secureBackupClient, experimentEnrollmentManager, dynamicConfigurationManager);
|
||||
RemoteConfigsManager remoteConfigsManager = new RemoteConfigsManager(remoteConfigs);
|
||||
DeadLetterHandler deadLetterHandler = new DeadLetterHandler(accountsManager, messagesManager);
|
||||
DispatchManager dispatchManager = new DispatchManager(pubSubClientFactory, Optional.of(deadLetterHandler));
|
||||
PubSubManager pubSubManager = new PubSubManager(pubsubClient, dispatchManager);
|
||||
APNSender apnSender = new APNSender(apnSenderExecutor, accountsManager, config.getApnConfiguration());
|
||||
GCMSender gcmSender = new GCMSender(gcmSenderExecutor, accountsManager, config.getGcmConfiguration().getApiKey());
|
||||
RateLimiters rateLimiters = new RateLimiters(config.getLimitsConfiguration(), dynamicConfigurationManager, rateLimitersCluster);
|
||||
ProvisioningManager provisioningManager = new ProvisioningManager(pubSubManager);
|
||||
TorExitNodeManager torExitNodeManager = new TorExitNodeManager(recurringJobExecutor, config.getTorExitNodeListConfiguration());
|
||||
AsnManager asnManager = new AsnManager(recurringJobExecutor, config.getAsnTableConfiguration());
|
||||
|
||||
AccountAuthenticator accountAuthenticator = new AccountAuthenticator(accountsManager);
|
||||
DisabledPermittedAccountAuthenticator disabledPermittedAccountAuthenticator = new DisabledPermittedAccountAuthenticator(accountsManager);
|
||||
|
||||
RateLimitResetMetricsManager rateLimitResetMetricsManager = new RateLimitResetMetricsManager(metricsCluster, Metrics.globalRegistry);
|
||||
|
||||
UnsealedSenderRateLimiter unsealedSenderRateLimiter = new UnsealedSenderRateLimiter(rateLimiters, rateLimitersCluster, dynamicConfigurationManager, rateLimitResetMetricsManager);
|
||||
PreKeyRateLimiter preKeyRateLimiter = new PreKeyRateLimiter(rateLimiters, dynamicConfigurationManager, rateLimitResetMetricsManager);
|
||||
|
||||
ApnFallbackManager apnFallbackManager = new ApnFallbackManager(pushSchedulerCluster, apnSender, accountsManager);
|
||||
TwilioSmsSender twilioSmsSender = new TwilioSmsSender(config.getTwilioConfiguration(), dynamicConfigurationManager);
|
||||
SmsSender smsSender = new SmsSender(twilioSmsSender);
|
||||
MessageSender messageSender = new MessageSender(apnFallbackManager, clientPresenceManager, messagesManager, gcmSender, apnSender, pushLatencyManager);
|
||||
ReceiptSender receiptSender = new ReceiptSender(accountsManager, messageSender);
|
||||
TurnTokenGenerator turnTokenGenerator = new TurnTokenGenerator(config.getTurnConfiguration());
|
||||
RecaptchaClient recaptchaClient = new RecaptchaClient(config.getRecaptchaConfiguration().getSecret());
|
||||
PushChallengeManager pushChallengeManager = new PushChallengeManager(apnSender, gcmSender, pushChallengeDynamoDb);
|
||||
RateLimitChallengeManager rateLimitChallengeManager = new RateLimitChallengeManager(pushChallengeManager, recaptchaClient, preKeyRateLimiter, unsealedSenderRateLimiter, rateLimiters, dynamicConfigurationManager);
|
||||
|
||||
MessagePersister messagePersister = new MessagePersister(messagesCache, messagesManager, accountsManager, dynamicConfigurationManager, Duration.ofMinutes(config.getMessageCacheConfiguration().getPersistDelayMinutes()));
|
||||
|
||||
final List<AccountDatabaseCrawlerListener> accountDatabaseCrawlerListeners = new ArrayList<>();
|
||||
accountDatabaseCrawlerListeners.add(new PushFeedbackProcessor(accountsManager, directoryQueue));
|
||||
accountDatabaseCrawlerListeners.add(new ActiveUserCounter(config.getMetricsFactory(), cacheCluster));
|
||||
for (DirectoryServerConfiguration directoryServerConfiguration : config.getDirectoryConfiguration().getDirectoryServerConfiguration()) {
|
||||
final DirectoryReconciliationClient directoryReconciliationClient = new DirectoryReconciliationClient(directoryServerConfiguration);
|
||||
final DirectoryReconciler directoryReconciler = new DirectoryReconciler(directoryServerConfiguration.getReplicationName(), directoryReconciliationClient);
|
||||
accountDatabaseCrawlerListeners.add(directoryReconciler);
|
||||
}
|
||||
accountDatabaseCrawlerListeners.add(new AccountCleaner(accountsManager));
|
||||
accountDatabaseCrawlerListeners.add(new RegistrationLockVersionCounter(metricsCluster, config.getMetricsFactory()));
|
||||
accountDatabaseCrawlerListeners.add(new AccountsDynamoDbMigrator(accountsDynamoDb, dynamicConfigurationManager));
|
||||
|
||||
HttpClient currencyClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_2).connectTimeout(Duration.ofSeconds(10)).build();
|
||||
FixerClient fixerClient = new FixerClient(currencyClient, config.getPaymentsServiceConfiguration().getFixerApiKey());
|
||||
FtxClient ftxClient = new FtxClient(currencyClient);
|
||||
CurrencyConversionManager currencyManager = new CurrencyConversionManager(fixerClient, ftxClient, config.getPaymentsServiceConfiguration().getPaymentCurrencies());
|
||||
|
||||
AccountDatabaseCrawlerCache accountDatabaseCrawlerCache = new AccountDatabaseCrawlerCache(cacheCluster);
|
||||
AccountDatabaseCrawler accountDatabaseCrawler = new AccountDatabaseCrawler(accountsManager, accountDatabaseCrawlerCache, accountDatabaseCrawlerListeners, config.getAccountDatabaseCrawlerConfiguration().getChunkSize(), config.getAccountDatabaseCrawlerConfiguration().getChunkIntervalMs());
|
||||
|
||||
apnSender.setApnFallbackManager(apnFallbackManager);
|
||||
environment.lifecycle().manage(apnFallbackManager);
|
||||
environment.lifecycle().manage(pubSubManager);
|
||||
environment.lifecycle().manage(messageSender);
|
||||
environment.lifecycle().manage(accountDatabaseCrawler);
|
||||
environment.lifecycle().manage(remoteConfigsManager);
|
||||
environment.lifecycle().manage(messagesCache);
|
||||
environment.lifecycle().manage(messagePersister);
|
||||
environment.lifecycle().manage(clientPresenceManager);
|
||||
environment.lifecycle().manage(currencyManager);
|
||||
environment.lifecycle().manage(torExitNodeManager);
|
||||
environment.lifecycle().manage(asnManager);
|
||||
|
||||
AWSCredentials credentials = new BasicAWSCredentials(config.getCdnConfiguration().getAccessKey(), config.getCdnConfiguration().getAccessSecret());
|
||||
AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(credentials);
|
||||
AmazonS3 cdnS3Client = AmazonS3Client.builder().withCredentials(credentialsProvider).withRegion(config.getCdnConfiguration().getRegion()).build();
|
||||
PostPolicyGenerator profileCdnPolicyGenerator = new PostPolicyGenerator(config.getCdnConfiguration().getRegion(), config.getCdnConfiguration().getBucket(), config.getCdnConfiguration().getAccessKey());
|
||||
PolicySigner profileCdnPolicySigner = new PolicySigner(config.getCdnConfiguration().getAccessSecret(), config.getCdnConfiguration().getRegion());
|
||||
|
||||
ServerSecretParams zkSecretParams = new ServerSecretParams(config.getZkConfig().getServerSecret());
|
||||
ServerZkProfileOperations zkProfileOperations = new ServerZkProfileOperations(zkSecretParams);
|
||||
ServerZkAuthOperations zkAuthOperations = new ServerZkAuthOperations(zkSecretParams);
|
||||
boolean isZkEnabled = config.getZkConfig().isEnabled();
|
||||
|
||||
AttachmentControllerV1 attachmentControllerV1 = new AttachmentControllerV1(rateLimiters, config.getAwsAttachmentsConfiguration().getAccessKey(), config.getAwsAttachmentsConfiguration().getAccessSecret(), config.getAwsAttachmentsConfiguration().getBucket());
|
||||
AttachmentControllerV2 attachmentControllerV2 = new AttachmentControllerV2(rateLimiters, config.getAwsAttachmentsConfiguration().getAccessKey(), config.getAwsAttachmentsConfiguration().getAccessSecret(), config.getAwsAttachmentsConfiguration().getRegion(), config.getAwsAttachmentsConfiguration().getBucket());
|
||||
AttachmentControllerV3 attachmentControllerV3 = new AttachmentControllerV3(rateLimiters, config.getGcpAttachmentsConfiguration().getDomain(), config.getGcpAttachmentsConfiguration().getEmail(), config.getGcpAttachmentsConfiguration().getMaxSizeInBytes(), config.getGcpAttachmentsConfiguration().getPathPrefix(), config.getGcpAttachmentsConfiguration().getRsaSigningKey());
|
||||
DonationController donationController = new DonationController(donationExecutor, config.getDonationConfiguration());
|
||||
KeysController keysController = new KeysController(rateLimiters, keysDynamoDb, accountsManager, directoryQueue, preKeyRateLimiter, dynamicConfigurationManager, rateLimitChallengeManager);
|
||||
MessageController messageController = new MessageController(rateLimiters, messageSender, receiptSender, accountsManager, messagesManager, unsealedSenderRateLimiter, apnFallbackManager, dynamicConfigurationManager, rateLimitChallengeManager, reportMessageManager, metricsCluster, declinedMessageReceiptExecutor);
|
||||
ProfileController profileController = new ProfileController(rateLimiters, accountsManager, profilesManager, usernamesManager, dynamicConfigurationManager, cdnS3Client, profileCdnPolicyGenerator, profileCdnPolicySigner, config.getCdnConfiguration().getBucket(), zkProfileOperations, isZkEnabled);
|
||||
StickerController stickerController = new StickerController(rateLimiters, config.getCdnConfiguration().getAccessKey(), config.getCdnConfiguration().getAccessSecret(), config.getCdnConfiguration().getRegion(), config.getCdnConfiguration().getBucket());
|
||||
RemoteConfigController remoteConfigController = new RemoteConfigController(remoteConfigsManager, config.getRemoteConfigConfiguration().getAuthorizedTokens(), config.getRemoteConfigConfiguration().getGlobalConfig());
|
||||
ChallengeController challengeController = new ChallengeController(rateLimitChallengeManager);
|
||||
|
||||
AuthFilter<BasicCredentials, Account> accountAuthFilter = new BasicCredentialAuthFilter.Builder<Account>().setAuthenticator(accountAuthenticator).buildAuthFilter ();
|
||||
AuthFilter<BasicCredentials, DisabledPermittedAccount> disabledPermittedAccountAuthFilter = new BasicCredentialAuthFilter.Builder<DisabledPermittedAccount>().setAuthenticator(disabledPermittedAccountAuthenticator).buildAuthFilter();
|
||||
|
||||
environment.servlets().addFilter("RemoteDeprecationFilter", new RemoteDeprecationFilter(dynamicConfigurationManager))
|
||||
.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "/*");
|
||||
|
||||
environment.jersey().register(MultiRecipientMessageProvider.class);
|
||||
environment.jersey().register(new MetricsApplicationEventListener(TrafficSource.HTTP));
|
||||
environment.jersey().register(new PolymorphicAuthDynamicFeature<>(ImmutableMap.of(Account.class, accountAuthFilter,
|
||||
DisabledPermittedAccount.class, disabledPermittedAccountAuthFilter)));
|
||||
environment.jersey().register(new PolymorphicAuthValueFactoryProvider.Binder<>(ImmutableSet.of(Account.class, DisabledPermittedAccount.class)));
|
||||
environment.jersey().register(new TimestampResponseFilter());
|
||||
environment.jersey().register(new AccountController(pendingAccountsManager, accountsManager, usernamesManager, abusiveHostRules, rateLimiters, smsSender, directoryQueue, messagesManager, dynamicConfigurationManager, turnTokenGenerator, config.getTestDevices(), recaptchaClient, gcmSender, apnSender, backupCredentialsGenerator, verifyExperimentEnrollmentManager));
|
||||
environment.jersey().register(new DeviceController(pendingDevicesManager, accountsManager, messagesManager, directoryQueue, rateLimiters, config.getMaxDevices()));
|
||||
environment.jersey().register(new DirectoryController(directoryCredentialsGenerator));
|
||||
environment.jersey().register(new ProvisioningController(rateLimiters, provisioningManager));
|
||||
environment.jersey().register(new CertificateController(new CertificateGenerator(config.getDeliveryCertificate().getCertificate(), config.getDeliveryCertificate().getPrivateKey(), config.getDeliveryCertificate().getExpiresDays()), zkAuthOperations, isZkEnabled));
|
||||
environment.jersey().register(new VoiceVerificationController(config.getVoiceVerificationConfiguration().getUrl(), config.getVoiceVerificationConfiguration().getLocales()));
|
||||
environment.jersey().register(new SecureStorageController(storageCredentialsGenerator));
|
||||
environment.jersey().register(new SecureBackupController(backupCredentialsGenerator));
|
||||
environment.jersey().register(new PaymentsController(currencyManager, paymentsCredentialsGenerator));
|
||||
environment.jersey().register(attachmentControllerV1);
|
||||
environment.jersey().register(attachmentControllerV2);
|
||||
environment.jersey().register(attachmentControllerV3);
|
||||
environment.jersey().register(donationController);
|
||||
environment.jersey().register(keysController);
|
||||
environment.jersey().register(messageController);
|
||||
environment.jersey().register(profileController);
|
||||
environment.jersey().register(stickerController);
|
||||
environment.jersey().register(remoteConfigController);
|
||||
environment.jersey().register(challengeController);
|
||||
|
||||
///
|
||||
WebSocketEnvironment<Account> webSocketEnvironment = new WebSocketEnvironment<>(environment, config.getWebSocketConfiguration(), 90000);
|
||||
webSocketEnvironment.setAuthenticator(new WebSocketAccountAuthenticator(accountAuthenticator));
|
||||
webSocketEnvironment.setConnectListener(new AuthenticatedConnectListener(receiptSender, messagesManager, messageSender, apnFallbackManager, clientPresenceManager, retrySchedulingExecutor));
|
||||
webSocketEnvironment.jersey().register(MultiRecipientMessageProvider.class);
|
||||
webSocketEnvironment.jersey().register(new MetricsApplicationEventListener(TrafficSource.WEBSOCKET));
|
||||
webSocketEnvironment.jersey().register(new KeepAliveController(clientPresenceManager));
|
||||
webSocketEnvironment.jersey().register(messageController);
|
||||
webSocketEnvironment.jersey().register(profileController);
|
||||
webSocketEnvironment.jersey().register(attachmentControllerV1);
|
||||
webSocketEnvironment.jersey().register(attachmentControllerV2);
|
||||
webSocketEnvironment.jersey().register(attachmentControllerV3);
|
||||
webSocketEnvironment.jersey().register(donationController);
|
||||
webSocketEnvironment.jersey().register(remoteConfigController);
|
||||
|
||||
WebSocketEnvironment<Account> provisioningEnvironment = new WebSocketEnvironment<>(environment, webSocketEnvironment.getRequestLog(), 60000);
|
||||
provisioningEnvironment.setConnectListener(new ProvisioningConnectListener(pubSubManager));
|
||||
provisioningEnvironment.jersey().register(new MetricsApplicationEventListener(TrafficSource.WEBSOCKET));
|
||||
provisioningEnvironment.jersey().register(new KeepAliveController(clientPresenceManager));
|
||||
|
||||
registerCorsFilter(environment);
|
||||
registerExceptionMappers(environment, webSocketEnvironment, provisioningEnvironment);
|
||||
|
||||
RateLimitChallengeExceptionMapper rateLimitChallengeExceptionMapper = new RateLimitChallengeExceptionMapper(rateLimitChallengeManager);
|
||||
|
||||
environment.jersey().register(rateLimitChallengeExceptionMapper);
|
||||
webSocketEnvironment.jersey().register(rateLimitChallengeExceptionMapper);
|
||||
provisioningEnvironment.jersey().register(rateLimitChallengeExceptionMapper);
|
||||
|
||||
WebSocketResourceProviderFactory<Account> webSocketServlet = new WebSocketResourceProviderFactory<>(webSocketEnvironment, Account.class);
|
||||
WebSocketResourceProviderFactory<Account> provisioningServlet = new WebSocketResourceProviderFactory<>(provisioningEnvironment, Account.class);
|
||||
|
||||
ServletRegistration.Dynamic websocket = environment.servlets().addServlet("WebSocket", webSocketServlet );
|
||||
ServletRegistration.Dynamic provisioning = environment.servlets().addServlet("Provisioning", provisioningServlet);
|
||||
|
||||
websocket.addMapping("/v1/websocket/");
|
||||
websocket.setAsyncSupported(true);
|
||||
|
||||
provisioning.addMapping("/v1/websocket/provisioning/");
|
||||
provisioning.setAsyncSupported(true);
|
||||
|
||||
environment.admin().addTask(new SetRequestLoggingEnabledTask());
|
||||
environment.admin().addTask(new SetCrawlerAccelerationTask(accountDatabaseCrawlerCache));
|
||||
|
||||
///
|
||||
|
||||
environment.healthChecks().register("cacheCluster", new RedisClusterHealthCheck(cacheCluster));
|
||||
|
||||
environment.metrics().register(name(CpuUsageGauge.class, "cpu"), new CpuUsageGauge(3, TimeUnit.SECONDS));
|
||||
environment.metrics().register(name(FreeMemoryGauge.class, "free_memory"), new FreeMemoryGauge());
|
||||
environment.metrics().register(name(NetworkSentGauge.class, "bytes_sent"), new NetworkSentGauge());
|
||||
environment.metrics().register(name(NetworkReceivedGauge.class, "bytes_received"), new NetworkReceivedGauge());
|
||||
environment.metrics().register(name(FileDescriptorGauge.class, "fd_count"), new FileDescriptorGauge());
|
||||
environment.metrics().register(name(MaxFileDescriptorGauge.class, "max_fd_count"), new MaxFileDescriptorGauge());
|
||||
environment.metrics().register(name(OperatingSystemMemoryGauge.class, "buffers"), new OperatingSystemMemoryGauge("Buffers"));
|
||||
environment.metrics().register(name(OperatingSystemMemoryGauge.class, "cached"), new OperatingSystemMemoryGauge("Cached"));
|
||||
|
||||
BufferPoolGauges.registerMetrics();
|
||||
GarbageCollectionGauges.registerMetrics();
|
||||
}
|
||||
|
||||
private void registerExceptionMappers(Environment environment, WebSocketEnvironment<Account> webSocketEnvironment, WebSocketEnvironment<Account> provisioningEnvironment) {
|
||||
environment.jersey().register(new IOExceptionMapper());
|
||||
environment.jersey().register(new RateLimitExceededExceptionMapper());
|
||||
environment.jersey().register(new InvalidWebsocketAddressExceptionMapper());
|
||||
environment.jersey().register(new DeviceLimitExceededExceptionMapper());
|
||||
environment.jersey().register(new RetryLaterExceptionMapper());
|
||||
|
||||
webSocketEnvironment.jersey().register(new IOExceptionMapper());
|
||||
webSocketEnvironment.jersey().register(new RateLimitExceededExceptionMapper());
|
||||
webSocketEnvironment.jersey().register(new InvalidWebsocketAddressExceptionMapper());
|
||||
webSocketEnvironment.jersey().register(new DeviceLimitExceededExceptionMapper());
|
||||
webSocketEnvironment.jersey().register(new RetryLaterExceptionMapper());
|
||||
|
||||
provisioningEnvironment.jersey().register(new IOExceptionMapper());
|
||||
provisioningEnvironment.jersey().register(new RateLimitExceededExceptionMapper());
|
||||
provisioningEnvironment.jersey().register(new InvalidWebsocketAddressExceptionMapper());
|
||||
provisioningEnvironment.jersey().register(new DeviceLimitExceededExceptionMapper());
|
||||
provisioningEnvironment.jersey().register(new RetryLaterExceptionMapper());
|
||||
}
|
||||
|
||||
private void registerCorsFilter(Environment environment) {
|
||||
FilterRegistration.Dynamic filter = environment.servlets().addFilter("CORS", CrossOriginFilter.class);
|
||||
filter.addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, "/*");
|
||||
filter.setInitParameter("allowedOrigins", "*");
|
||||
filter.setInitParameter("allowedHeaders", "Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin,X-Signal-Agent");
|
||||
filter.setInitParameter("allowedMethods", "GET,PUT,POST,DELETE,OPTIONS");
|
||||
filter.setInitParameter("preflightMaxAge", "5184000");
|
||||
filter.setInitParameter("allowCredentials", "true");
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new WhisperServerService().run(args);
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import io.micrometer.core.instrument.Metrics;
|
||||
import org.whispersystems.textsecuregcm.storage.Account;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountsManager;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import io.dropwizard.auth.Authenticator;
|
||||
import io.dropwizard.auth.basic.BasicCredentials;
|
||||
|
||||
import static com.codahale.metrics.MetricRegistry.name;
|
||||
|
||||
public class AccountAuthenticator extends BaseAccountAuthenticator implements Authenticator<BasicCredentials, Account> {
|
||||
|
||||
private static final String AUTHENTICATION_COUNTER_NAME = name(AccountAuthenticator.class, "authenticate");
|
||||
private static final String GV2_CAPABLE_TAG_NAME = "gv1Migration";
|
||||
|
||||
public AccountAuthenticator(AccountsManager accountsManager) {
|
||||
super(accountsManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Account> authenticate(BasicCredentials basicCredentials) {
|
||||
final Optional<Account> maybeAccount = super.authenticate(basicCredentials, true);
|
||||
|
||||
// TODO Remove this temporary counter when we can replace it with more generic feature adoption system
|
||||
maybeAccount.ifPresent(account -> {
|
||||
Metrics.counter(AUTHENTICATION_COUNTER_NAME, GV2_CAPABLE_TAG_NAME, String.valueOf(account.isGv1MigrationSupported())).increment();
|
||||
});
|
||||
|
||||
return maybeAccount;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class AmbiguousIdentifier {
|
||||
|
||||
private final UUID uuid;
|
||||
private final String number;
|
||||
|
||||
public AmbiguousIdentifier(String target) {
|
||||
if (target.startsWith("+")) {
|
||||
this.uuid = null;
|
||||
this.number = target;
|
||||
} else {
|
||||
this.uuid = UUID.fromString(target);
|
||||
this.number = null;
|
||||
}
|
||||
}
|
||||
|
||||
public UUID getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public boolean hasUuid() {
|
||||
return uuid != null;
|
||||
}
|
||||
|
||||
public boolean hasNumber() {
|
||||
return number != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return hasUuid() ? uuid.toString() : number;
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import java.util.Base64;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
public class Anonymous {
|
||||
|
||||
private final byte[] unidentifiedSenderAccessKey;
|
||||
|
||||
public Anonymous(String header) {
|
||||
try {
|
||||
this.unidentifiedSenderAccessKey = Base64.getDecoder().decode(header);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new WebApplicationException(e, Response.Status.UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] getAccessKey() {
|
||||
return unidentifiedSenderAccessKey;
|
||||
}
|
||||
}
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
|
||||
public class AuthenticationCredentials {
|
||||
|
||||
private final String hashedAuthenticationToken;
|
||||
private final String salt;
|
||||
|
||||
public AuthenticationCredentials(String hashedAuthenticationToken, String salt) {
|
||||
this.hashedAuthenticationToken = hashedAuthenticationToken;
|
||||
this.salt = salt;
|
||||
}
|
||||
|
||||
public AuthenticationCredentials(String authenticationToken) {
|
||||
this.salt = String.valueOf(Math.abs(new SecureRandom().nextInt()));
|
||||
this.hashedAuthenticationToken = getHashedValue(salt, authenticationToken);
|
||||
}
|
||||
|
||||
public String getHashedAuthenticationToken() {
|
||||
return hashedAuthenticationToken;
|
||||
}
|
||||
|
||||
public String getSalt() {
|
||||
return salt;
|
||||
}
|
||||
|
||||
public boolean verify(String authenticationToken) {
|
||||
String theirValue = getHashedValue(salt, authenticationToken);
|
||||
return MessageDigest.isEqual(theirValue.getBytes(StandardCharsets.UTF_8), this.hashedAuthenticationToken.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
private static String getHashedValue(String salt, String token) {
|
||||
try {
|
||||
return new String(Hex.encodeHex(MessageDigest.getInstance("SHA1").digest((salt + token).getBytes(StandardCharsets.UTF_8))));
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
|
||||
import org.whispersystems.textsecuregcm.util.Util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Base64;
|
||||
|
||||
public class AuthorizationHeader {
|
||||
|
||||
private final AmbiguousIdentifier identifier;
|
||||
private final long deviceId;
|
||||
private final String password;
|
||||
|
||||
private AuthorizationHeader(AmbiguousIdentifier identifier, long deviceId, String password) {
|
||||
this.identifier = identifier;
|
||||
this.deviceId = deviceId;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public static AuthorizationHeader fromUserAndPassword(String user, String password) throws InvalidAuthorizationHeaderException {
|
||||
try {
|
||||
String[] numberAndId = user.split("\\.");
|
||||
return new AuthorizationHeader(new AmbiguousIdentifier(numberAndId[0]),
|
||||
numberAndId.length > 1 ? Long.parseLong(numberAndId[1]) : 1,
|
||||
password);
|
||||
} catch (NumberFormatException nfe) {
|
||||
throw new InvalidAuthorizationHeaderException(nfe);
|
||||
}
|
||||
}
|
||||
|
||||
public static AuthorizationHeader fromFullHeader(String header) throws InvalidAuthorizationHeaderException {
|
||||
try {
|
||||
if (header == null) {
|
||||
throw new InvalidAuthorizationHeaderException("Null header");
|
||||
}
|
||||
|
||||
String[] headerParts = header.split(" ");
|
||||
|
||||
if (headerParts == null || headerParts.length < 2) {
|
||||
throw new InvalidAuthorizationHeaderException("Invalid authorization header: " + header);
|
||||
}
|
||||
|
||||
if (!"Basic".equals(headerParts[0])) {
|
||||
throw new InvalidAuthorizationHeaderException("Unsupported authorization method: " + headerParts[0]);
|
||||
}
|
||||
|
||||
String concatenatedValues = new String(Base64.getDecoder().decode(headerParts[1]));
|
||||
|
||||
if (Util.isEmpty(concatenatedValues)) {
|
||||
throw new InvalidAuthorizationHeaderException("Bad decoded value: " + concatenatedValues);
|
||||
}
|
||||
|
||||
String[] credentialParts = concatenatedValues.split(":");
|
||||
|
||||
if (credentialParts == null || credentialParts.length < 2) {
|
||||
throw new InvalidAuthorizationHeaderException("Badly formated credentials: " + concatenatedValues);
|
||||
}
|
||||
|
||||
return fromUserAndPassword(credentialParts[0], credentialParts[1]);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new InvalidAuthorizationHeaderException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public AmbiguousIdentifier getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public long getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
}
|
||||
-121
@@ -1,121 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import com.codahale.metrics.Meter;
|
||||
import com.codahale.metrics.MetricRegistry;
|
||||
import com.codahale.metrics.SharedMetricRegistries;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import io.dropwizard.auth.basic.BasicCredentials;
|
||||
import io.micrometer.core.instrument.DistributionSummary;
|
||||
import io.micrometer.core.instrument.Metrics;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.textsecuregcm.storage.Account;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountsManager;
|
||||
import org.whispersystems.textsecuregcm.storage.Device;
|
||||
import org.whispersystems.textsecuregcm.util.Constants;
|
||||
import org.whispersystems.textsecuregcm.util.Util;
|
||||
|
||||
import java.time.Clock;
|
||||
import java.time.Duration;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Optional;
|
||||
|
||||
import static com.codahale.metrics.MetricRegistry.name;
|
||||
|
||||
public class BaseAccountAuthenticator {
|
||||
|
||||
private final MetricRegistry metricRegistry = SharedMetricRegistries.getOrCreate(Constants.METRICS_NAME);
|
||||
private final Meter authenticationFailedMeter = metricRegistry.meter(name(getClass(), "authentication", "failed" ));
|
||||
private final Meter authenticationSucceededMeter = metricRegistry.meter(name(getClass(), "authentication", "succeeded" ));
|
||||
private final Meter noSuchAccountMeter = metricRegistry.meter(name(getClass(), "authentication", "noSuchAccount" ));
|
||||
private final Meter noSuchDeviceMeter = metricRegistry.meter(name(getClass(), "authentication", "noSuchDevice" ));
|
||||
private final Meter accountDisabledMeter = metricRegistry.meter(name(getClass(), "authentication", "accountDisabled"));
|
||||
private final Meter deviceDisabledMeter = metricRegistry.meter(name(getClass(), "authentication", "deviceDisabled" ));
|
||||
private final Meter invalidAuthHeaderMeter = metricRegistry.meter(name(getClass(), "authentication", "invalidHeader" ));
|
||||
|
||||
private final String daysSinceLastSeenDistributionName = name(getClass(), "authentication", "daysSinceLastSeen");
|
||||
|
||||
private static final String IS_PRIMARY_DEVICE_TAG = "isPrimary";
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(BaseAccountAuthenticator.class);
|
||||
|
||||
private final AccountsManager accountsManager;
|
||||
private final Clock clock;
|
||||
|
||||
public BaseAccountAuthenticator(AccountsManager accountsManager) {
|
||||
this(accountsManager, Clock.systemUTC());
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public BaseAccountAuthenticator(AccountsManager accountsManager, Clock clock) {
|
||||
this.accountsManager = accountsManager;
|
||||
this.clock = clock;
|
||||
}
|
||||
|
||||
public Optional<Account> authenticate(BasicCredentials basicCredentials, boolean enabledRequired) {
|
||||
try {
|
||||
AuthorizationHeader authorizationHeader = AuthorizationHeader.fromUserAndPassword(basicCredentials.getUsername(), basicCredentials.getPassword());
|
||||
Optional<Account> account = accountsManager.get(authorizationHeader.getIdentifier());
|
||||
|
||||
if (!account.isPresent()) {
|
||||
noSuchAccountMeter.mark();
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
Optional<Device> device = account.get().getDevice(authorizationHeader.getDeviceId());
|
||||
|
||||
if (!device.isPresent()) {
|
||||
noSuchDeviceMeter.mark();
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
if (enabledRequired) {
|
||||
if (!device.get().isEnabled()) {
|
||||
deviceDisabledMeter.mark();
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
if (!account.get().isEnabled()) {
|
||||
accountDisabledMeter.mark();
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
if (device.get().getAuthenticationCredentials().verify(basicCredentials.getPassword())) {
|
||||
authenticationSucceededMeter.mark();
|
||||
account.get().setAuthenticatedDevice(device.get());
|
||||
updateLastSeen(account.get(), device.get());
|
||||
return account;
|
||||
}
|
||||
|
||||
authenticationFailedMeter.mark();
|
||||
return Optional.empty();
|
||||
} catch (IllegalArgumentException | InvalidAuthorizationHeaderException iae) {
|
||||
invalidAuthHeaderMeter.mark();
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public void updateLastSeen(Account account, Device device) {
|
||||
final long lastSeenOffsetSeconds = Math.abs(account.getUuid().getLeastSignificantBits()) % ChronoUnit.DAYS.getDuration().toSeconds();
|
||||
final long todayInMillisWithOffset = Util.todayInMillisGivenOffsetFromNow(clock, Duration.ofSeconds(lastSeenOffsetSeconds).negated());
|
||||
|
||||
if (device.getLastSeen() < todayInMillisWithOffset) {
|
||||
DistributionSummary.builder(daysSinceLastSeenDistributionName)
|
||||
.tags(IS_PRIMARY_DEVICE_TAG, String.valueOf(device.isMaster()))
|
||||
.publishPercentileHistogram()
|
||||
.register(Metrics.globalRegistry)
|
||||
.record(Duration.ofMillis(todayInMillisWithOffset - device.getLastSeen()).toDays());
|
||||
|
||||
device.setLastSeen(Util.todayInMillis(clock));
|
||||
accountsManager.update(account);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import com.google.protobuf.ByteString;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import org.whispersystems.textsecuregcm.crypto.Curve;
|
||||
import org.whispersystems.textsecuregcm.crypto.ECPrivateKey;
|
||||
import org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate;
|
||||
import org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate;
|
||||
import org.whispersystems.textsecuregcm.storage.Account;
|
||||
import org.whispersystems.textsecuregcm.storage.Device;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.util.Base64;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class CertificateGenerator {
|
||||
|
||||
private final ECPrivateKey privateKey;
|
||||
private final int expiresDays;
|
||||
private final ServerCertificate serverCertificate;
|
||||
|
||||
public CertificateGenerator(byte[] serverCertificate, ECPrivateKey privateKey, int expiresDays)
|
||||
throws InvalidProtocolBufferException
|
||||
{
|
||||
this.privateKey = privateKey;
|
||||
this.expiresDays = expiresDays;
|
||||
this.serverCertificate = ServerCertificate.parseFrom(serverCertificate);
|
||||
}
|
||||
|
||||
public byte[] createFor(Account account, Device device, boolean includeE164) throws IOException, InvalidKeyException {
|
||||
SenderCertificate.Certificate.Builder builder = SenderCertificate.Certificate.newBuilder()
|
||||
.setSenderDevice(Math.toIntExact(device.getId()))
|
||||
.setExpires(System.currentTimeMillis() + TimeUnit.DAYS.toMillis(expiresDays))
|
||||
.setIdentityKey(ByteString.copyFrom(Base64.getDecoder().decode(account.getIdentityKey())))
|
||||
.setSigner(serverCertificate)
|
||||
.setSenderUuid(account.getUuid().toString());
|
||||
|
||||
if (includeE164) {
|
||||
builder.setSender(account.getNumber());
|
||||
}
|
||||
|
||||
byte[] certificate = builder.build().toByteArray();
|
||||
byte[] signature = Curve.calculateSignature(privateKey, certificate);
|
||||
|
||||
return SenderCertificate.newBuilder()
|
||||
.setCertificate(ByteString.copyFrom(certificate))
|
||||
.setSignature(ByteString.copyFrom(signature))
|
||||
.build()
|
||||
.toByteArray();
|
||||
}
|
||||
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2021 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import java.util.Base64;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.Status;
|
||||
|
||||
public class CombinedUnidentifiedSenderAccessKeys {
|
||||
private final byte[] combinedUnidentifiedSenderAccessKeys;
|
||||
|
||||
public CombinedUnidentifiedSenderAccessKeys(String header) {
|
||||
try {
|
||||
this.combinedUnidentifiedSenderAccessKeys = Base64.getDecoder().decode(header);
|
||||
if (this.combinedUnidentifiedSenderAccessKeys == null || this.combinedUnidentifiedSenderAccessKeys.length != 16) {
|
||||
throw new WebApplicationException("Invalid combined unidentified sender access keys", Status.UNAUTHORIZED);
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new WebApplicationException(e, Response.Status.UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] getAccessKeys() {
|
||||
return combinedUnidentifiedSenderAccessKeys;
|
||||
}
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import org.whispersystems.textsecuregcm.storage.Account;
|
||||
|
||||
import javax.security.auth.Subject;
|
||||
import java.security.Principal;
|
||||
|
||||
public class DisabledPermittedAccount implements Principal {
|
||||
|
||||
private final Account account;
|
||||
|
||||
public DisabledPermittedAccount(Account account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public Account getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
// Principal implementation
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean implies(Subject subject) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import org.whispersystems.textsecuregcm.storage.Account;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountsManager;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import io.dropwizard.auth.Authenticator;
|
||||
import io.dropwizard.auth.basic.BasicCredentials;
|
||||
|
||||
public class DisabledPermittedAccountAuthenticator extends BaseAccountAuthenticator implements Authenticator<BasicCredentials, DisabledPermittedAccount> {
|
||||
|
||||
public DisabledPermittedAccountAuthenticator(AccountsManager accountsManager) {
|
||||
super(accountsManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<DisabledPermittedAccount> authenticate(BasicCredentials credentials) {
|
||||
Optional<Account> account = super.authenticate(credentials, false);
|
||||
return account.map(DisabledPermittedAccount::new);
|
||||
}
|
||||
}
|
||||
-112
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.textsecuregcm.util.Util;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class ExternalServiceCredentialGenerator {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(ExternalServiceCredentialGenerator.class);
|
||||
|
||||
private final byte[] key;
|
||||
private final byte[] userIdKey;
|
||||
private final boolean usernameDerivation;
|
||||
|
||||
public ExternalServiceCredentialGenerator(byte[] key, byte[] userIdKey, boolean usernameDerivation) {
|
||||
this.key = key;
|
||||
this.userIdKey = userIdKey;
|
||||
this.usernameDerivation = usernameDerivation;
|
||||
}
|
||||
|
||||
public ExternalServiceCredentials generateFor(String number) {
|
||||
Mac mac = getMacInstance();
|
||||
String username = getUserId(number, mac, usernameDerivation);
|
||||
long currentTimeSeconds = System.currentTimeMillis() / 1000;
|
||||
String prefix = username + ":" + currentTimeSeconds;
|
||||
String output = Hex.encodeHexString(Util.truncate(getHmac(key, prefix.getBytes(), mac), 10));
|
||||
String token = prefix + ":" + output;
|
||||
|
||||
return new ExternalServiceCredentials(username, token);
|
||||
}
|
||||
|
||||
|
||||
public boolean isValid(String token, String number, long currentTimeMillis) {
|
||||
String[] parts = token.split(":");
|
||||
Mac mac = getMacInstance();
|
||||
|
||||
if (parts.length != 3) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!getUserId(number, mac, usernameDerivation).equals(parts[0])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isValidTime(parts[1], currentTimeMillis)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isValidSignature(parts[0] + ":" + parts[1], parts[2], mac);
|
||||
}
|
||||
|
||||
private String getUserId(String number, Mac mac, boolean usernameDerivation) {
|
||||
if (usernameDerivation) return Hex.encodeHexString(Util.truncate(getHmac(userIdKey, number.getBytes(), mac), 10));
|
||||
else return number;
|
||||
}
|
||||
|
||||
private boolean isValidTime(String timeString, long currentTimeMillis) {
|
||||
try {
|
||||
long tokenTime = Long.parseLong(timeString);
|
||||
long ourTime = TimeUnit.MILLISECONDS.toSeconds(currentTimeMillis);
|
||||
|
||||
return TimeUnit.SECONDS.toHours(Math.abs(ourTime - tokenTime)) < 24;
|
||||
} catch (NumberFormatException e) {
|
||||
logger.warn("Number Format", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isValidSignature(String prefix, String suffix, Mac mac) {
|
||||
try {
|
||||
byte[] ourSuffix = Util.truncate(getHmac(key, prefix.getBytes(), mac), 10);
|
||||
byte[] theirSuffix = Hex.decodeHex(suffix.toCharArray());
|
||||
|
||||
return MessageDigest.isEqual(ourSuffix, theirSuffix);
|
||||
} catch (DecoderException e) {
|
||||
logger.warn("DirectoryCredentials", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private Mac getMacInstance() {
|
||||
try {
|
||||
return Mac.getInstance("HmacSHA256");
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] getHmac(byte[] key, byte[] input, Mac mac) {
|
||||
try {
|
||||
mac.init(new SecretKeySpec(key, "HmacSHA256"));
|
||||
return mac.doFinal(input);
|
||||
} catch (InvalidKeyException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class ExternalServiceCredentials {
|
||||
|
||||
@JsonProperty
|
||||
private String username;
|
||||
|
||||
@JsonProperty
|
||||
private String password;
|
||||
|
||||
public ExternalServiceCredentials(String username, String password) {
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public ExternalServiceCredentials() {}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
|
||||
public class InvalidAuthorizationHeaderException extends Exception {
|
||||
public InvalidAuthorizationHeaderException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public InvalidAuthorizationHeaderException(Exception e) {
|
||||
super(e);
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import org.whispersystems.textsecuregcm.storage.Account;
|
||||
import org.whispersystems.textsecuregcm.storage.Device;
|
||||
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.Response;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Optional;
|
||||
|
||||
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
|
||||
public class OptionalAccess {
|
||||
|
||||
public static final String UNIDENTIFIED = "Unidentified-Access-Key";
|
||||
|
||||
public static void verify(Optional<Account> requestAccount,
|
||||
Optional<Anonymous> accessKey,
|
||||
Optional<Account> targetAccount,
|
||||
String deviceSelector)
|
||||
{
|
||||
try {
|
||||
verify(requestAccount, accessKey, targetAccount);
|
||||
|
||||
if (!deviceSelector.equals("*")) {
|
||||
long deviceId = Long.parseLong(deviceSelector);
|
||||
|
||||
Optional<Device> targetDevice = targetAccount.get().getDevice(deviceId);
|
||||
|
||||
if (targetDevice.isPresent() && targetDevice.get().isEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (requestAccount.isPresent()) {
|
||||
throw new WebApplicationException(Response.Status.NOT_FOUND);
|
||||
} else {
|
||||
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
throw new WebApplicationException(Response.status(422).build());
|
||||
}
|
||||
}
|
||||
|
||||
public static void verify(Optional<Account> requestAccount,
|
||||
Optional<Anonymous> accessKey,
|
||||
Optional<Account> targetAccount)
|
||||
{
|
||||
if (requestAccount.isPresent() && targetAccount.isPresent() && targetAccount.get().isEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
//noinspection ConstantConditions
|
||||
if (requestAccount.isPresent() && (targetAccount.isEmpty() || (targetAccount.isPresent() && !targetAccount.get().isEnabled()))) {
|
||||
throw new WebApplicationException(Response.Status.NOT_FOUND);
|
||||
}
|
||||
|
||||
if (accessKey.isPresent() && targetAccount.isPresent() && targetAccount.get().isEnabled() && targetAccount.get().isUnrestrictedUnidentifiedAccess()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (accessKey.isPresent() &&
|
||||
targetAccount.isPresent() &&
|
||||
targetAccount.get().getUnidentifiedAccessKey().isPresent() &&
|
||||
targetAccount.get().isEnabled() &&
|
||||
MessageDigest.isEqual(accessKey.get().getAccessKey(), targetAccount.get().getUnidentifiedAccessKey().get()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
|
||||
}
|
||||
|
||||
}
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import org.whispersystems.textsecuregcm.util.Util;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
|
||||
public class StoredRegistrationLock {
|
||||
|
||||
private final Optional<String> registrationLock;
|
||||
|
||||
private final Optional<String> registrationLockSalt;
|
||||
|
||||
private final Optional<String> deprecatedPin;
|
||||
|
||||
private final long lastSeen;
|
||||
|
||||
public StoredRegistrationLock(Optional<String> registrationLock, Optional<String> registrationLockSalt, Optional<String> deprecatedPin, long lastSeen) {
|
||||
this.registrationLock = registrationLock;
|
||||
this.registrationLockSalt = registrationLockSalt;
|
||||
this.deprecatedPin = deprecatedPin;
|
||||
this.lastSeen = lastSeen;
|
||||
}
|
||||
|
||||
public boolean requiresClientRegistrationLock() {
|
||||
return ((registrationLock.isPresent() && registrationLockSalt.isPresent()) || deprecatedPin.isPresent()) && System.currentTimeMillis() - lastSeen < TimeUnit.DAYS.toMillis(7);
|
||||
}
|
||||
|
||||
public boolean needsFailureCredentials() {
|
||||
return registrationLock.isPresent() && registrationLockSalt.isPresent();
|
||||
}
|
||||
|
||||
public boolean hasDeprecatedPin() {
|
||||
return deprecatedPin.isPresent();
|
||||
}
|
||||
|
||||
public long getTimeRemaining() {
|
||||
return TimeUnit.DAYS.toMillis(7) - (System.currentTimeMillis() - lastSeen);
|
||||
}
|
||||
|
||||
public boolean verify(@Nullable String clientRegistrationLock, @Nullable String clientDeprecatedPin) {
|
||||
if (Util.isEmpty(clientRegistrationLock) && Util.isEmpty(clientDeprecatedPin)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (registrationLock.isPresent() && registrationLockSalt.isPresent() && !Util.isEmpty(clientRegistrationLock)) {
|
||||
return new AuthenticationCredentials(registrationLock.get(), registrationLockSalt.get()).verify(clientRegistrationLock);
|
||||
} else if (deprecatedPin.isPresent() && !Util.isEmpty(clientDeprecatedPin)) {
|
||||
return MessageDigest.isEqual(deprecatedPin.get().getBytes(), clientDeprecatedPin.getBytes());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public StoredRegistrationLock forTime(long timestamp) {
|
||||
return new StoredRegistrationLock(registrationLock, registrationLockSalt, deprecatedPin, timestamp);
|
||||
}
|
||||
}
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.whispersystems.textsecuregcm.util.Util;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class StoredVerificationCode {
|
||||
|
||||
@JsonProperty
|
||||
private String code;
|
||||
|
||||
@JsonProperty
|
||||
private long timestamp;
|
||||
|
||||
@JsonProperty
|
||||
private String pushCode;
|
||||
|
||||
@JsonProperty
|
||||
private String twilioVerificationSid;
|
||||
|
||||
public StoredVerificationCode() {
|
||||
}
|
||||
|
||||
public StoredVerificationCode(String code, long timestamp, String pushCode) {
|
||||
this(code, timestamp, pushCode, null);
|
||||
}
|
||||
|
||||
public StoredVerificationCode(String code, long timestamp, String pushCode, String twilioVerificationSid) {
|
||||
this.code = code;
|
||||
this.timestamp = timestamp;
|
||||
this.pushCode = pushCode;
|
||||
this.twilioVerificationSid = twilioVerificationSid;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public long getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public String getPushCode() {
|
||||
return pushCode;
|
||||
}
|
||||
|
||||
public Optional<String> getTwilioVerificationSid() {
|
||||
return Optional.ofNullable(twilioVerificationSid);
|
||||
}
|
||||
|
||||
public boolean isValid(String theirCodeString) {
|
||||
if (timestamp + TimeUnit.MINUTES.toMillis(10) < System.currentTimeMillis()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Util.isEmpty(code) || Util.isEmpty(theirCodeString)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
byte[] ourCode = code.getBytes();
|
||||
byte[] theirCode = theirCodeString.getBytes();
|
||||
|
||||
return MessageDigest.isEqual(ourCode, theirCode);
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TurnToken {
|
||||
|
||||
@JsonProperty
|
||||
private String username;
|
||||
|
||||
@JsonProperty
|
||||
private String password;
|
||||
|
||||
@JsonProperty
|
||||
private List<String> urls;
|
||||
|
||||
public TurnToken(String username, String password, List<String> urls) {
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.urls = urls;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import org.whispersystems.textsecuregcm.configuration.TurnConfiguration;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Base64;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class TurnTokenGenerator {
|
||||
|
||||
private final byte[] key;
|
||||
private final List<String> urls;
|
||||
|
||||
public TurnTokenGenerator(TurnConfiguration configuration) {
|
||||
this.key = configuration.getSecret().getBytes();
|
||||
this.urls = configuration.getUris();
|
||||
}
|
||||
|
||||
public TurnToken generate() {
|
||||
try {
|
||||
Mac mac = Mac.getInstance("HmacSHA1");
|
||||
long validUntilSeconds = (System.currentTimeMillis() + TimeUnit.DAYS.toMillis(1)) / 1000;
|
||||
long user = Math.abs(new SecureRandom().nextInt());
|
||||
String userTime = validUntilSeconds + ":" + user;
|
||||
|
||||
mac.init(new SecretKeySpec(key, "HmacSHA1"));
|
||||
String password = Base64.getEncoder().encodeToString(mac.doFinal(userTime.getBytes()));
|
||||
|
||||
return new TurnToken(userTime, password, urls);
|
||||
} catch (NoSuchAlgorithmException | InvalidKeyException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2020 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.auth;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Base64;
|
||||
import java.util.Optional;
|
||||
|
||||
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
|
||||
public class UnidentifiedAccessChecksum {
|
||||
|
||||
public static String generateFor(Optional<byte[]> unidentifiedAccessKey) {
|
||||
try {
|
||||
if (!unidentifiedAccessKey.isPresent()|| unidentifiedAccessKey.get().length != 16) return null;
|
||||
|
||||
Mac mac = Mac.getInstance("HmacSHA256");
|
||||
mac.init(new SecretKeySpec(unidentifiedAccessKey.get(), "HmacSHA256"));
|
||||
|
||||
return Base64.getEncoder().encodeToString(mac.doFinal(new byte[32]));
|
||||
} catch (NoSuchAlgorithmException | InvalidKeyException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loaded 100 of 658 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user