Changing the length of access token 17/198017/1 accepted/tizen/5.0/unified/20190123.074155 submit/tizen_5.0/20190118.011006
authorsourav bhuwalka <s.bhuwalka@samsung.com>
Mon, 14 Jan 2019 13:34:49 +0000 (19:04 +0530)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 18 Jan 2019 01:05:47 +0000 (10:05 +0900)
Access token property of the cloud needs to be changed from 256bytes to 1kb

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/392
(cherry picked from commit 89f95a89892e44f893c3d395bcd3cde142efb0c0)

Change-Id: I57d5b1caeeca75f526df9e51d78d80fa75d6aae2
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
service/easy-setup/enrollee/inc/ESEnrolleeCommon.h
service/easy-setup/enrollee/src/resourcehandler.c
service/easy-setup/enrollee/src/resourcehandler.h
service/easy-setup/inc/escommon.h

index 91811a5..08c2bbe 100755 (executable)
@@ -65,7 +65,7 @@ typedef struct
 typedef struct
 {
     char authCode[OIC_STRING_MAX_VALUE];        /**< Auth code issued by OAuth2.0-compatible account server **/
-    char accessToken[OIC_STRING_MAX_VALUE];     /**< Access token resolved with an auth code **/
+    char accessToken[OIC_STRING_ACCESS_TOKEN_MAX_VALUE];     /**< Access token resolved with an auth code **/
     OAUTH_TOKENTYPE accessTokenType;            /**< Access token type **/
     char authProvider[OIC_STRING_MAX_VALUE];    /**< Auth provider ID **/
     char ciServer[OIC_STRING_MAX_VALUE];        /**< Cloud interface server URL which an Enrollee is going to registered **/
index bebd813..1156390 100755 (executable)
@@ -442,7 +442,7 @@ void updateCoapCloudConfResource(OCRepPayload* input)
     }
 
     memset(cloudData->authCode, 0, OIC_STRING_MAX_VALUE);
-    memset(cloudData->accessToken, 0, OIC_STRING_MAX_VALUE);
+    memset(cloudData->accessToken, 0, OIC_STRING_ACCESS_TOKEN_MAX_VALUE);
     g_ESCoapCloudConfResource.accessTokenType = NONE_OAUTH_TOKENTYPE;
     memset(cloudData->authProvider, 0, OIC_STRING_MAX_VALUE);
     memset(cloudData->ciServer, 0, OIC_STRING_MAX_VALUE);
index 3696171..aa5aeaf 100755 (executable)
@@ -68,7 +68,7 @@ typedef struct
 {
     OCResourceHandle handle;
     char authCode[OIC_STRING_MAX_VALUE];
-    char accessToken[OIC_STRING_MAX_VALUE];
+    char accessToken[OIC_STRING_ACCESS_TOKEN_MAX_VALUE];
     OAUTH_TOKENTYPE accessTokenType;
     char authProvider[OIC_STRING_MAX_VALUE];
     char ciServer[OIC_STRING_MAX_VALUE];
index 94c5df1..d2e16f6 100644 (file)
@@ -36,10 +36,11 @@ extern "C"
 
 
 
-#define OIC_STRING_MAX_VALUE    256
-#define MAX_WEBLINKLEN          3
-#define NUM_WIFIMODE            10
-#define NUM_CONNECT_TYPE        3
+#define OIC_STRING_MAX_VALUE                  256
+#define OIC_STRING_ACCESS_TOKEN_MAX_VALUE     1024
+#define MAX_WEBLINKLEN                        3
+#define NUM_WIFIMODE                          10
+#define NUM_CONNECT_TYPE                      3
 
 /**
  * Attributes used to form a proper easysetup conforming JSON message.