From 517438af310965bb19dff507614c4fb32ae7f674 Mon Sep 17 00:00:00 2001 From: Tyler <jabcckdef@gmail.com> Date: Mon, 13 May 2019 18:30:51 +0800 Subject: [PATCH] username to account --- .idea/workspace.xml | 266 +++++++++--------- .../iotgateway/cloud/config/DefaultData.java | 2 +- .../iotgateway/cloud/pojo/auth/User.java | 2 +- .../iotgateway/cloud/CloudHttpApiTest.java | 2 +- .../gateway/config/DefaultData.class | Bin 1986 -> 1985 bytes .../gateway/repositories/UserRepository.class | Bin 635 -> 633 bytes .../gateway/services/UserService.class | Bin 3984 -> 3980 bytes .../gateway/GatewayHttpApiTest.class | Bin 8504 -> 8503 bytes .../gateway/config/DefaultData.java | 2 +- .../gateway/pojo/auth/SensitiveUser.java | 2 +- .../gateway/repositories/UserRepository.java | 4 +- .../gateway/services/UserService.java | 10 +- .../gateway/GatewayHttpApiTest.java | 6 +- 13 files changed, 141 insertions(+), 155 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 574f870..41835ed 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,27 +4,18 @@ <list default="true" id="d3a5f2c9-d22f-4974-88fb-d506b4e5feaf" name="Default Changelist" comment=""> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/DefaultData.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/DefaultData.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/controllers/DeviceController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/controllers/DeviceController.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/controllers/GatewayController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/controllers/GatewayController.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/SensitiveUser.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/privacy/PrivacyContent.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/privacy/PrivacyContent.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/repositories/SensitiveUserRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/repositories/SensitiveUserRepository.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/services/SensitiveUserService.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/services/SensitiveUserService.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud/src/test/java/edu/prlab/tyler/iotgateway/cloud/CloudHttpApiTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud/src/test/java/edu/prlab/tyler/iotgateway/cloud/CloudHttpApiTest.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.class" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/controllers/UserController.class" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/controllers/UserController.class" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/pojo/auth/User$UserBuilder.class" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/pojo/auth/User.class" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.class" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService$1.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService.class" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/services/UserService.class" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/services/UserService.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/out/test/classes/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.class" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/out/test/classes/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/controllers/UserController.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/controllers/UserController.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/SensitiveUser.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/SensitiveUser.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/SensitiveUser.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java" afterDir="false" /> </list> @@ -86,7 +77,7 @@ <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="220"> + <state relative-caret-position="328"> <caret line="41" column="71" selection-start-line="41" selection-start-column="71" selection-end-line="41" selection-end-column="71" /> <folding> <element signature="imports" expanded="true" /> @@ -97,22 +88,10 @@ </entry> </file> <file pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="162"> - <caret line="9" column="1" lean-forward="true" selection-start-line="9" selection-start-column="1" selection-end-line="9" selection-end-column="1" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> - </file> - <file pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/controllers/GatewayController.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="270"> - <caret line="61" column="40" selection-start-line="61" selection-start-column="40" selection-end-line="61" selection-end-column="40" /> + <state relative-caret-position="415"> + <caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" /> <folding> <element signature="imports" expanded="true" /> </folding> @@ -123,8 +102,8 @@ <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="198"> - <caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" /> + <state relative-caret-position="306"> + <caret line="22" column="26" selection-start-line="22" selection-start-column="19" selection-end-line="22" selection-end-column="26" /> </state> </provider> </entry> @@ -132,8 +111,8 @@ <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/SensitiveUser.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="342"> - <caret line="19" column="18" selection-start-line="19" selection-start-column="18" selection-end-line="19" selection-end-column="18" /> + <state relative-caret-position="432"> + <caret line="24" column="27" lean-forward="true" selection-start-line="24" selection-start-column="27" selection-end-line="24" selection-end-column="27" /> <folding> <element signature="imports" expanded="true" /> </folding> @@ -142,10 +121,10 @@ </entry> </file> <file pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/PrivacyChoiceIndex.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/DeviceService.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="288"> - <caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" /> + <state relative-caret-position="535"> + <caret line="41" column="82" lean-forward="true" selection-start-line="41" selection-start-column="82" selection-end-line="41" selection-end-column="82" /> <folding> <element signature="imports" expanded="true" /> </folding> @@ -154,22 +133,28 @@ </entry> </file> <file pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/model/PrivacyChoiceResponse.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="306"> - <caret line="17" column="17" selection-start-line="17" selection-start-column="17" selection-end-line="17" selection-end-column="17" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> + <state relative-caret-position="319"> + <caret line="76" column="80" selection-start-line="76" selection-start-column="80" selection-end-line="76" selection-end-column="80" /> + </state> + </provider> + </entry> + </file> + <file pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/DefaultData.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="228"> + <caret line="39" column="19" selection-start-line="39" selection-start-column="19" selection-end-line="39" selection-end-column="19" /> </state> </provider> </entry> </file> <file pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/DeviceIndex.java"> + <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/privacy/PrivacyContent.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="306"> - <caret line="17" column="23" lean-forward="true" selection-start-line="17" selection-start-column="23" selection-end-line="17" selection-end-column="23" /> + <state relative-caret-position="648"> + <caret line="36" column="1" lean-forward="true" selection-start-line="36" selection-start-column="1" selection-end-line="36" selection-end-column="1" /> <folding> <element signature="imports" expanded="true" /> </folding> @@ -178,25 +163,19 @@ </entry> </file> <file pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/controllers/UserController.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="450"> - <caret line="27" column="39" selection-start-line="27" selection-start-column="26" selection-end-line="27" selection-end-column="39" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> + <state relative-caret-position="216"> + <caret line="18" column="140" selection-start-line="18" selection-start-column="140" selection-end-line="18" selection-end-column="140" /> </state> </provider> </entry> </file> - <file pinned="false" current-in-tab="true"> - <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/privacy/PrivacyContent.java"> + <file pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/cloud/src/test/java/edu/prlab/tyler/iotgateway/cloud/CloudHttpApiTest.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="567"> - <caret line="36" column="1" lean-forward="true" selection-start-line="36" selection-start-column="1" selection-end-line="36" selection-end-column="1" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> + <state relative-caret-position="228"> + <caret line="65" column="30" selection-start-line="65" selection-start-column="30" selection-end-line="65" selection-end-column="30" /> </state> </provider> </entry> @@ -213,7 +192,6 @@ </component> <component name="FindInProjectRecents"> <findStrings> - <find>null</find> <find>account</find> <find>url</find> <find>SIGN_UP_URL</find> @@ -243,6 +221,7 @@ <find>TypeReference</find> <find>DeviceIndex</find> <find>getPrivacyPolicyChoices</find> + <find>username</find> </findStrings> <replaceStrings> <replace>cloud</replace> @@ -259,7 +238,6 @@ <component name="IdeDocumentHistory"> <option name="CHANGED_PATHS"> <list> - <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/jwt/JWTAuthenticationFilter.java" /> <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/jwt/JwtTokenAuthenticationFilter.java" /> <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/jwt/JwtUsernamePasswordAuthenticationFilter.java" /> <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/jwt/JwtAuthenticationConfig.java" /> @@ -268,7 +246,6 @@ <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/SensitiveUser.java" /> <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/repositories/SensitiveUserRepository.java" /> <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/privacy/PrivacyContent.java" /> - <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/DefaultData.java" /> <option value="$PROJECT_DIR$/contract/src/main/java/edu/prlab/tyler/iotgateway/contract/GatewayManager.java" /> <option value="$PROJECT_DIR$/contract/src/main/java/edu/prlab/tyler/iotgateway/contract/DeviceContract.java" /> <option value="$PROJECT_DIR$/contract/src/main/resources/application.properties" /> @@ -291,18 +268,14 @@ <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/DeviceRepository.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/PrivacyChoicesIndex.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/RemoteConfig.java" /> - <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java" /> <option value="$PROJECT_DIR$/gateway/src/main/resources/application.properties" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/controllers/UserController.java" /> - <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/User.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/DeviceService.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/DeviceIndex.java" /> - <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java" /> <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/controllers/GatewayController.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/PrivacyContent.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/privacy/PrivacyContent.java" /> - <option value="$PROJECT_DIR$/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/GatewayApplication.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/PrivacyChoiceIndex.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/model/PrivacyChoiceResponse.java" /> @@ -310,6 +283,12 @@ <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/controllers/GatewayController.java" /> <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService.java" /> <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java" /> + <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/SensitiveUser.java" /> + <option value="$PROJECT_DIR$/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java" /> + <option value="$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/DefaultData.java" /> + <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java" /> + <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java" /> + <option value="$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.java" /> </list> </option> </component> @@ -709,7 +688,7 @@ <workItem from="1556190478077" duration="66951000" /> <workItem from="1556716964298" duration="27672000" /> <workItem from="1557364868133" duration="620000" /> - <workItem from="1557365602468" duration="51520000" /> + <workItem from="1557365602468" duration="51858000" /> </task> <task id="LOCAL-00001" summary="git init"> <created>1556204675975</created> @@ -788,7 +767,14 @@ <option name="project" value="LOCAL" /> <updated>1557741333378</updated> </task> - <option name="localTasksCounter" value="12" /> + <task id="LOCAL-00012" summary="PrivacyChoice api"> + <created>1557743076836</created> + <option name="number" value="00012" /> + <option name="presentableId" value="LOCAL-00012" /> + <option name="project" value="LOCAL" /> + <updated>1557743076836</updated> + </task> + <option name="localTasksCounter" value="13" /> <servers /> </component> <component name="TestHistory"> @@ -824,7 +810,7 @@ </history-entry> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="149435000" /> + <option name="totallyTimeSpent" value="149773000" /> </component> <component name="TodoView"> <todo-panel id="selected-file"> @@ -845,10 +831,10 @@ <window_info id="Favorites" order="4" side_tool="true" /> <window_info id="Web" order="5" side_tool="true" /> <window_info anchor="bottom" id="Run Dashboard" order="0" sideWeight="0.49946696" weight="0.39198217" /> - <window_info anchor="bottom" id="Messages" order="1" sideWeight="0.49733475" weight="0.20824054" /> + <window_info anchor="bottom" id="Messages" order="1" sideWeight="0.49733475" visible="true" weight="0.20824054" /> <window_info anchor="bottom" id="Message" order="2" /> <window_info anchor="bottom" id="Find" order="3" sideWeight="0.4989339" weight="0.4532294" /> - <window_info anchor="bottom" id="Run" order="4" sideWeight="0.49840087" visible="true" weight="0.1726058" /> + <window_info anchor="bottom" id="Run" order="4" sideWeight="0.49840087" weight="0.1726058" /> <window_info anchor="bottom" id="Debug" order="5" weight="0.16592428" /> <window_info anchor="bottom" id="Cvs" order="6" weight="0.25" /> <window_info anchor="bottom" id="Inspection" order="7" weight="0.4" /> @@ -912,27 +898,6 @@ </breakpoint-manager> </component> <component name="editorHistoryManager"> - <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/privacy/PrivacyPolicyReport.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="162"> - <caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" /> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/services/PrivacyChoiceService.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="126"> - <caret line="12" column="5" selection-start-line="12" selection-start-column="5" selection-end-line="12" selection-end-column="5" /> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/services/PrivacyPolicyReportService.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="108"> - <caret line="11" column="13" selection-start-line="11" selection-start-column="13" selection-end-line="11" selection-end-column="13" /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/p3p/Statement.java"> <provider selected="true" editor-type-id="text-editor" /> </entry> @@ -1055,33 +1020,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="232"> - <caret line="107" column="21" selection-start-line="107" selection-start-column="21" selection-end-line="107" selection-end-column="21" /> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="558"> - <caret line="33" column="5" selection-start-line="33" selection-start-column="5" selection-end-line="33" selection-end-column="5" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/DeviceService.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="535"> - <caret line="41" column="82" lean-forward="true" selection-start-line="41" selection-start-column="82" selection-end-line="41" selection-end-column="82" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/PrivacyChoiceIndexRepository.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="126"> @@ -1146,84 +1084,132 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/DeviceIndex.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="198"> - <caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" /> + <state relative-caret-position="306"> + <caret line="17" column="23" lean-forward="true" selection-start-line="17" selection-start-column="23" selection-end-line="17" selection-end-column="23" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/DeviceIndex.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="306"> - <caret line="17" column="23" lean-forward="true" selection-start-line="17" selection-start-column="23" selection-end-line="17" selection-end-column="23" /> + <state relative-caret-position="162"> + <caret line="9" column="1" lean-forward="true" selection-start-line="9" selection-start-column="1" selection-end-line="9" selection-end-column="1" /> <folding> <element signature="imports" expanded="true" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/PrivacyChoiceIndex.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="220"> - <caret line="41" column="71" selection-start-line="41" selection-start-column="71" selection-end-line="41" selection-end-column="71" /> + <state relative-caret-position="288"> + <caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" /> <folding> <element signature="imports" expanded="true" /> - <element signature="e#1087#1116#1" expanded="true" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/model/PrivacyChoiceResponse.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="162"> - <caret line="9" column="1" lean-forward="true" selection-start-line="9" selection-start-column="1" selection-end-line="9" selection-end-column="1" /> + <state relative-caret-position="306"> + <caret line="17" column="17" selection-start-line="17" selection-start-column="17" selection-end-line="17" selection-end-column="17" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/privacy/PrivacyContent.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="648"> + <caret line="36" column="1" lean-forward="true" selection-start-line="36" selection-start-column="1" selection-end-line="36" selection-end-column="1" /> <folding> <element signature="imports" expanded="true" /> </folding> </state> </provider> </entry> + <entry file="file://$PROJECT_DIR$/cloud/src/test/java/edu/prlab/tyler/iotgateway/cloud/CloudHttpApiTest.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="228"> + <caret line="65" column="30" selection-start-line="65" selection-start-column="30" selection-end-line="65" selection-end-column="30" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="216"> + <caret line="18" column="140" selection-start-line="18" selection-start-column="140" selection-end-line="18" selection-end-column="140" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="306"> + <caret line="22" column="26" selection-start-line="22" selection-start-column="19" selection-end-line="22" selection-end-column="26" /> + </state> + </provider> + </entry> <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/SensitiveUser.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="342"> - <caret line="19" column="18" selection-start-line="19" selection-start-column="18" selection-end-line="19" selection-end-column="18" /> + <state relative-caret-position="432"> + <caret line="24" column="27" lean-forward="true" selection-start-line="24" selection-start-column="27" selection-end-line="24" selection-end-column="27" /> <folding> <element signature="imports" expanded="true" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/PrivacyChoiceIndex.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="288"> - <caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" /> + <state relative-caret-position="415"> + <caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" /> <folding> <element signature="imports" expanded="true" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/model/PrivacyChoiceResponse.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/PrivacyService.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="306"> - <caret line="17" column="17" selection-start-line="17" selection-start-column="17" selection-end-line="17" selection-end-column="17" /> + <state relative-caret-position="328"> + <caret line="41" column="71" selection-start-line="41" selection-start-column="71" selection-end-line="41" selection-end-column="71" /> <folding> <element signature="imports" expanded="true" /> + <element signature="e#1087#1116#1" expanded="true" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/privacy/PrivacyContent.java"> + <entry file="file://$PROJECT_DIR$/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/DeviceService.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="567"> - <caret line="36" column="1" lean-forward="true" selection-start-line="36" selection-start-column="1" selection-end-line="36" selection-end-column="1" /> + <state relative-caret-position="535"> + <caret line="41" column="82" lean-forward="true" selection-start-line="41" selection-start-column="82" selection-end-line="41" selection-end-column="82" /> <folding> <element signature="imports" expanded="true" /> </folding> </state> </provider> </entry> + <entry file="file://$PROJECT_DIR$/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="319"> + <caret line="76" column="80" selection-start-line="76" selection-start-column="80" selection-end-line="76" selection-end-column="80" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/DefaultData.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="228"> + <caret line="39" column="19" selection-start-line="39" selection-start-column="19" selection-end-line="39" selection-end-column="19" /> + </state> + </provider> + </entry> </component> <component name="masterDetails"> <states> diff --git a/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/DefaultData.java b/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/DefaultData.java index be4a650..bd553a6 100644 --- a/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/DefaultData.java +++ b/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/config/DefaultData.java @@ -37,7 +37,7 @@ public class DefaultData implements ApplicationRunner { public void run(ApplicationArguments args) { // User user = User.builder() -// .username("test") +// .account("test") // .password("test") // .build(); // sensitiveUserService.add(user); diff --git a/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java b/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java index e06d1a5..4979957 100644 --- a/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java +++ b/cloud/src/main/java/edu/prlab/tyler/iotgateway/cloud/pojo/auth/User.java @@ -20,7 +20,7 @@ public class User { @GeneratedValue(strategy = GenerationType.IDENTITY) private long id; - private String username; + private String account; private String password; // private BigInteger publicKey; diff --git a/cloud/src/test/java/edu/prlab/tyler/iotgateway/cloud/CloudHttpApiTest.java b/cloud/src/test/java/edu/prlab/tyler/iotgateway/cloud/CloudHttpApiTest.java index d65cc8f..9a66ee6 100644 --- a/cloud/src/test/java/edu/prlab/tyler/iotgateway/cloud/CloudHttpApiTest.java +++ b/cloud/src/test/java/edu/prlab/tyler/iotgateway/cloud/CloudHttpApiTest.java @@ -179,7 +179,7 @@ public class CloudHttpApiTest { PrivacyChoice privacyChoice = PrivacyChoice.builder() .privacyContent(PrivacyContent.builder() .user(User.builder() - .username("test") + .account("test") .password("test") .build()) .device(device) diff --git a/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.class b/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.class index fb2d43b82c4ed3beeda9638367ad1dfffcec091c..097ff7dc42d59627adedacb4cd798f0160ca31ba 100644 GIT binary patch delta 21 ccmX@ae~^De2MY&#VsdhRX<o_Zi7bZ909ES;RsaA1 delta 22 dcmX@ee~5oW2MZ@hX>n>%USe+Q<_Ro@%m80n2g(2d diff --git a/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.class b/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.class index 26de2346f57ef0f514f9490b76dc761bce173608..3839dc4ccfb7bb1731c36b4a19738b9ac3889d55 100644 GIT binary patch delta 55 zcmey(@{?tPsHk9CW?o8YacYrMrDJk(era9_BSXN%i6Rs2?F9H!D>92qis3RF``$7F E053ljnE(I) delta 51 wcmey#@|$IXsIX94W?o8YacYrMC5X&R%uSuB9x5o1T9H{?Qj8GX*z=YV0QR>N_5c6? diff --git a/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/services/UserService.class b/gateway/out/production/classes/edu/prlab/tyler/iotgateway/gateway/services/UserService.class index 43a9d7278e57a67928c93e7f6aab22a7fcf2dc38..c48109208fd5b43a9a08301334928052eb0d7221 100644 GIT binary patch delta 87 zcmbOr-y^?4orQxvF*!NEG_Pc{0ShZDH&=RUi6d0Nk+X|YTQDs%FD0}%waBRwD$dBj ZQk+<p%E-W<T9H{?QVf^a{DW%-3jn;%9S#5h delta 91 zcmeB?pCG?MorRO5v^cdWFEKZDvpx$eD-U;iYDp+e#GbQ@QCBD}GcN@s<WvchU}Rt^ YPAp4hWDrQL$Sf`?M#yab!Zm{h07`!z+W-In diff --git a/gateway/out/test/classes/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.class b/gateway/out/test/classes/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.class index c1f8b3da745eb568a967bfd8153259b6c7e81190..9c074eb8d7c268fede2bd593681541e540e054d2 100644 GIT binary patch delta 21 ccmdntwB2dL4PFlR#N_1s(!7$*4|&6d0b?r&kN^Mx delta 22 dcmdn)w8Lq`4PH);(&E&jyu{qp%@26Pg#m3v2?PKD diff --git a/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.java b/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.java index 8d7858e..da5e443 100644 --- a/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.java +++ b/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/config/DefaultData.java @@ -16,7 +16,7 @@ public class DefaultData implements ApplicationRunner { @Override public void run(ApplicationArguments args) throws Exception { - SensitiveUser defaultUser = userService.registerNewUser(SensitiveUser.builder().username("testUser0").password("testUser0").build()).get(); + SensitiveUser defaultUser = userService.registerNewUser(SensitiveUser.builder().account("testUser0").password("testUser0").build()).get(); System.out.println(defaultUser.toString()); } } diff --git a/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/SensitiveUser.java b/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/SensitiveUser.java index fcace03..537951c 100644 --- a/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/SensitiveUser.java +++ b/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/pojo/auth/SensitiveUser.java @@ -22,7 +22,7 @@ public class SensitiveUser { @GeneratedValue(strategy = GenerationType.IDENTITY) @JsonIgnore private long id; - private String username; + private String account; private String password; // private BigInteger publicKey; // private BigInteger privateKey; diff --git a/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java b/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java index 9b2aaaf..a418444 100644 --- a/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java +++ b/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/repositories/UserRepository.java @@ -5,6 +5,6 @@ import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; @Repository public interface UserRepository extends CrudRepository<SensitiveUser, Long> { - SensitiveUser findUserByUsername(String username); - boolean existsByUsername(String username); + SensitiveUser findUserByAccount(String account); + boolean existsByAccount(String account); } diff --git a/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java b/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java index 5344a42..1d563fc 100644 --- a/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java +++ b/gateway/src/main/java/edu/prlab/tyler/iotgateway/gateway/services/UserService.java @@ -20,16 +20,16 @@ public class UserService { //需è¦å¢žåŠ åŠ å¯†æ©Ÿåˆ¶ public Optional<SensitiveUser> registerNewUser(SensitiveUser user) { return Optional.ofNullable(user) - .map(SensitiveUser::getUsername) - .filter(username->!userRepository.existsByUsername(username)) - .map(username -> userRepository.save(user)); + .map(SensitiveUser::getAccount) + .filter(account->!userRepository.existsByAccount(account)) + .map(account -> userRepository.save(user)); } //TODO //需è¦å¢žåŠ è§£å¯†ç¢ºèª public Optional<SensitiveUser> login(SensitiveUser user) { - return Optional.ofNullable(user.getUsername()) - .map(username -> userRepository.findUserByUsername(username)) + return Optional.ofNullable(user.getAccount()) + .map(account -> userRepository.findUserByAccount(account)) .filter(sensitiveUser->sensitiveUser.getPassword().equals(user.getPassword())); } } diff --git a/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java b/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java index 8225769..1c66e75 100644 --- a/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java +++ b/gateway/src/test/java/edu/prlab/tyler/iotgateway/gateway/GatewayHttpApiTest.java @@ -51,7 +51,7 @@ public class GatewayHttpApiTest { .post("/login") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON_UTF8) - .content(mapper.writeValueAsString(SensitiveUser.builder().username("testUser0").password("testUser0").build()))) + .content(mapper.writeValueAsString(SensitiveUser.builder().account("testUser0").password("testUser0").build()))) .andDo(print()) .andExpect(status().isOk()) .andReturn(); @@ -74,7 +74,7 @@ public class GatewayHttpApiTest { .post("/device/" + "a1252c49-4188-4e6d-a32e-66604c664fb8") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON_UTF8) - .content(mapper.writeValueAsString(SensitiveUser.builder().username("testUser0").password("testUser0").build()))) + .content(mapper.writeValueAsString(SensitiveUser.builder().account("testUser0").password("testUser0").build()))) .andDo(print()) .andExpect(status().isOk()) .andReturn(); @@ -96,7 +96,7 @@ public class GatewayHttpApiTest { PrivacyChoice privacyChoice = PrivacyChoice.builder() .privacyContent(PrivacyContent.builder() .user(User.builder() - .username("test") + .account("test") .password("test") .build()) .device(device) -- 2.26.0