Skip to content

Commit 220785e

Browse files
authored
Merge pull request #166 from nqkdev/master
Update request signature validation example
2 parents 7a7fb5b + e540a5e commit 220785e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

examples/src/main/java/ExampleRequestSignatureValidation.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,26 @@
2222
* Created by hasselbach
2323
*
2424
* For exposing your application for external calls (webhooks from MessageBird)
25-
* you can use serveo.net: `ssh -R 80:localhost:3000 serveo.net`
25+
* you can use localtunnel (requires NodeJS).
2626
*
27-
* Here is example of usage
27+
* Here is example of usage:
28+
*
29+
* Install localtunnel globally:
30+
* npm install -g localtunnel
2831
*
2932
* Select a free port: 3000, for example
3033
* export MBEXAMPLEPORT=3000
3134
*
3235
* Run:
33-
* ssh -R 80:localhost:$MBEXAMPLEPORT serveo.net
36+
* lt --port $MBEXAMPLEPORT
3437
*
3538
* It will show you something like this:
36-
* Hi there
37-
* Forwarding HTTP traffic from https://blabla.serveo.net
38-
* Press g to start a GUI session and ctrl-c to quit.
39+
* your url is: https://loud-yak-31.loca.lt
3940
*
4041
* * NOTE * you should not terminate this process, so next operations should be done in the other terminal session
4142
*
4243
* Remember the address from output:
43-
* export FORWARDING_URL=https://blabla.serveo.net
44+
* export FORWARDING_URL=https://loud-yak-31.loca.lt
4445
*
4546
* Take your access and secret key from Dashboard:
4647
* secret key from https://dashboard.messagebird.com/en/developers/settings
@@ -57,8 +58,8 @@
5758
* and then you will see in example app output:
5859
* New request:
5960
* GET /webhook?id=ee2d02749a6fb78a572bd7ce9118dff&mccmnc=20409&ported=0&recipient=XXXXXX&reference=example-server&status=delivered&statusDatetime=2019-01-10T09%3A23%3A03%2B00%3A00
60-
* Request has valid signature
6161
* Message for XXXXXX is delivered
62+
* Request has valid signature
6263
*
6364
* Description of webhook parameters can be found on
6465
* https://developers.messagebird.com/docs/sms-messaging#handle-a-status-report

0 commit comments

Comments
 (0)