Skip to content

Commit 1198952

Browse files
committed
Always verify the fingerprint (as recommended) in the examples (callback-server is still missing)
1 parent b3def98 commit 1198952

6 files changed

Lines changed: 12 additions & 3 deletions

File tree

examples/e2e.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ def main():
123123
connection = Connection(
124124
identity='*YOUR_GATEWAY_THREEMA_ID',
125125
secret='YOUR_GATEWAY_THREEMA_ID_SECRET',
126-
key='private:YOUR_PRIVATE_KEY'
126+
key='private:YOUR_PRIVATE_KEY',
127+
verify_fingerprint=True,
127128
)
128129
try:
129130
with connection:

examples/e2e_blocking.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def main():
115115
identity='*YOUR_GATEWAY_THREEMA_ID',
116116
secret='YOUR_GATEWAY_THREEMA_ID_SECRET',
117117
key='private:YOUR_PRIVATE_KEY',
118+
verify_fingerprint=True,
118119
blocking=True,
119120
)
120121
try:

examples/lookup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717

1818
@asyncio.coroutine
1919
def main():
20-
connection = Connection('*YOUR_GATEWAY_THREEMA_ID', 'YOUR_GATEWAY_THREEMA_ID_SECRET')
20+
connection = Connection(
21+
identity='*YOUR_GATEWAY_THREEMA_ID',
22+
secret='YOUR_GATEWAY_THREEMA_ID_SECRET',
23+
verify_fingerprint=True,
24+
)
2125
try:
2226
with connection:
2327
print((yield from connection.get_credits()))

examples/lookup_blocking.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515

1616
def main():
1717
connection = Connection(
18-
blocking=True,
1918
identity='*YOUR_GATEWAY_THREEMA_ID',
2019
secret='YOUR_GATEWAY_THREEMA_ID_SECRET',
20+
verify_fingerprint=True,
21+
blocking=True,
2122
)
2223
try:
2324
with connection:

examples/simple.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def main():
5959
connection = Connection(
6060
identity='*YOUR_GATEWAY_THREEMA_ID',
6161
secret='YOUR_GATEWAY_THREEMA_ID_SECRET',
62+
verify_fingerprint=True,
6263
)
6364
try:
6465
with connection:

examples/simple_blocking.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def main():
5353
connection = Connection(
5454
identity='*YOUR_GATEWAY_THREEMA_ID',
5555
secret='YOUR_GATEWAY_THREEMA_ID_SECRET',
56+
verify_fingerprint=True,
5657
blocking=True,
5758
)
5859
try:

0 commit comments

Comments
 (0)