From 3471fa3c798dab387120413973dee29f20791bf8 Mon Sep 17 00:00:00 2001 From: lzc-1997-abel <70368631+lzc-1997-abel@users.noreply.github.com> Date: Mon, 16 Nov 2020 12:24:53 +0800 Subject: [PATCH 1/2] Add user name information when modifying todolist --- .../src/main/resources/static/App/Scripts/todoListCtrl.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/resources/static/App/Scripts/todoListCtrl.js b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/resources/static/App/Scripts/todoListCtrl.js index 6bbcac53e5be2..f255f5f9794a1 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/resources/static/App/Scripts/todoListCtrl.js +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/resources/static/App/Scripts/todoListCtrl.js @@ -10,7 +10,8 @@ angular.module('todoApp') $scope.editInProgressTodo = { Description: "", - ID: 0 + ID: 0, + Owner: msalService.userInfo.userName }; @@ -65,4 +66,4 @@ angular.module('todoApp') $scope.loadingMsg = ""; }) }; - }]); \ No newline at end of file + }]); From c80fb1798f7411e5264085a9475b98db206d9400 Mon Sep 17 00:00:00 2001 From: lzc-1997-abel <70368631+lzc-1997-abel@users.noreply.github.com> Date: Mon, 16 Nov 2020 12:25:10 +0800 Subject: [PATCH 2/2] Modify the configuration information in the readme --- .../README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/README.md b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/README.md index d9e8d5bd3c728..ba9c53852333d 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/README.md +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/README.md @@ -127,15 +127,16 @@ window.applicationConfig = { msalProvider.init( { - authority: 'https://login.microsoftonline.com/', - clientID: applicationConfig.clientID, - cacheLocation: 'localStorage', - postLogoutRedirectUri: 'http://localhost:8080/logout', - - tokenReceivedCallback: function (errorDesc, token, error, tokenType) { + auth: { + clientId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + authority: "https://login.microsoftonline.com/", + redirectUri: "http://localhost:8080/", }, - }, - $httpProvider + cache: { + cacheLocation: "sessionStorage", // This configures where your cache will be stored + storeAuthStateInCookie: false, // Set this to "true" if you are having issues on IE11 or Edge + } + } ); ``` @@ -159,4 +160,4 @@ First, we need to ensure that this [instruction] is completed before run. ## Contributing -[instruction]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/CONTRIBUTING.md#building-from-source \ No newline at end of file +[instruction]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/CONTRIBUTING.md#building-from-source