Imported Upstream version 1.1.0
[platform/upstream/iotivity.git] / cloud / samples / client / README
1 To build cloud client sample, add WITH_TCP, TARGET_TRANSPORT=IP and WITH_CLOUD option to build command
2
3 ex) scons WITH_TCP=yes TARGET_TRANSPORT=IP WITH_CLOUD=yes
4
5 Cloud client runs using CoAP over TCP transport. So you should add WITH_TCP option.
6
7 Once you get sample which file name is 'cloud_device', you need 'Auth Code' to register resources on cloud with account scenario.
8
9 Cloud stack has sample github oauth2 adaptor.
10
11 So you can instantly test sample using 'Auth Code'.
12
13 Paste below URL to your browser
14
15 https://github.com/login?return_to=%2Flogin%2Foauth%2Fauthorize%3Fclient_id%3Dea9c18f540323b0213d0%26redirect_uri%3Dhttp%253A%252F%252Fwww.example.com%252Foauth_callback%252F
16
17 And you'll see login page provided by github, and after logged in, you'll be redirectd to below site.
18
19 http://www.example.com/oauth_callback/?code=bf9beb5db17ea476fa46
20
21 You can get 'Auth Code', value of '?code' query string.
22
23 The 'Auth Code' is one time token. So you need other token to run other device.
24
25 Account server has pre-coded admin credential which session is '00000000'. You can use this credential for immediate tests.