Skip to content

Commit 28ec448

Browse files
update readme for sample and fix some question (Azure#17587)
* Add user name information when modifying todolist * Modify the configuration information in the readme
1 parent 7f0b710 commit 28ec448

File tree

2 files changed

+13
-11
lines changed
  • sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory

2 files changed

+13
-11
lines changed

sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,16 @@ window.applicationConfig = {
127127

128128
msalProvider.init(
129129
{
130-
authority: 'https://login.microsoftonline.com/<tenant>',
131-
clientID: applicationConfig.clientID,
132-
cacheLocation: 'localStorage',
133-
postLogoutRedirectUri: 'http://localhost:8080/logout',
134-
135-
tokenReceivedCallback: function (errorDesc, token, error, tokenType) {
130+
auth: {
131+
clientId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
132+
authority: "https://login.microsoftonline.com/<tenant>",
133+
redirectUri: "http://localhost:8080/",
136134
},
137-
},
138-
$httpProvider
135+
cache: {
136+
cacheLocation: "sessionStorage", // This configures where your cache will be stored
137+
storeAuthStateInCookie: false, // Set this to "true" if you are having issues on IE11 or Edge
138+
}
139+
}
139140
);
140141
```
141142

@@ -159,4 +160,4 @@ First, we need to ensure that this [instruction] is completed before run.
159160
## Contributing
160161
161162
<!-- LINKS -->
162-
[instruction]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/CONTRIBUTING.md#building-from-source
163+
[instruction]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/CONTRIBUTING.md#building-from-source

sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/resources/static/App/Scripts/todoListCtrl.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ angular.module('todoApp')
1010

1111
$scope.editInProgressTodo = {
1212
Description: "",
13-
ID: 0
13+
ID: 0,
14+
Owner: msalService.userInfo.userName
1415
};
1516

1617

@@ -65,4 +66,4 @@ angular.module('todoApp')
6566
$scope.loadingMsg = "";
6667
})
6768
};
68-
}]);
69+
}]);

0 commit comments

Comments
 (0)