Skip to content

Commit 8a289ab

Browse files
committed
Change AAD token to SAS token
1 parent 1d1f474 commit 8a289ab

280 files changed

Lines changed: 1258 additions & 1839 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Samples/3D-layer/Flowmap.gl/src/Flowmap.gl.js‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ function onload () {
3131

3232
//Add authentication details for connecting to Azure Maps.
3333
authOptions: {
34-
//Use Microsoft Entra ID authentication.
35-
authType: 'anonymous',
36-
clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', //Your Azure Maps client id for accessing your Azure Maps account.
34+
// Use SAS token for authentication
35+
authType: 'sas',
3736
getToken: function (resolve, reject, map) {
38-
//URL to your authentication service that retrieves an Microsoft Entra ID Token.
39-
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsToken';
37+
// URL to your authentication service that retrieves a SAS Token
38+
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsSasToken';
4039

4140
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
4241
}

‎Samples/3D-layer/Threebox/Threebox.html‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@
3535

3636
// Add authentication details for connecting to Azure Maps.
3737
authOptions: {
38-
// Use Microsoft Entra ID authentication.
39-
authType: 'anonymous',
40-
clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', // Your Azure Maps client id for accessing your Azure Maps account.
38+
// Use SAS token for authentication
39+
authType: 'sas',
4140
getToken: function (resolve, reject, map) {
42-
// URL to your authentication service that retrieves an Microsoft Entra ID Token.
43-
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsToken';
41+
// URL to your authentication service that retrieves a SAS Token
42+
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsSasToken';
4443

4544
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
4645
}

‎Samples/3D-layer/WebGL/WebGLLayer.html‎

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -130,21 +130,13 @@
130130

131131
// Add authentication details for connecting to Azure Maps
132132
authOptions: {
133-
// Use Microsoft Entra ID authentication in production
134-
authType: 'anonymous',
135-
clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', // Your Azure Maps client id for accessing your Azure Maps account
133+
// Use SAS token for authentication
134+
authType: 'sas',
136135
getToken: function (resolve, reject, map) {
137-
// URL to your authentication service that retrieves an Microsoft Entra ID Token
138-
fetch('https://samples.azuremaps.com/api/GetAzureMapsToken')
139-
.then(function (response) {
140-
return response.text();
141-
})
142-
.then(function (token) {
143-
resolve(token);
144-
})
145-
.catch(function (error) {
146-
reject(new Error(`Failed to fetch Azure Maps token: ${error.message}`));
147-
});
136+
// URL to your authentication service that retrieves a SAS Token
137+
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsSasToken';
138+
139+
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
148140
}
149141

150142
// Alternatively, use an Azure Maps key in development

‎Samples/3D-layer/deck.gl/deck.gl.html‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@
3333

3434
//Add your Azure Maps subscription client ID to the map SDK. Get an Azure Maps client ID at https://azure.com/maps
3535
authOptions: {
36-
//Use Microsoft Entra ID authentication.
37-
authType: 'anonymous',
38-
clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', //Your Azure Maps client id for accessing your Azure Maps account.
36+
// Use SAS token for authentication
37+
authType: 'sas',
3938
getToken: function (resolve, reject, map) {
40-
//URL to your authentication service that retrieves an Microsoft Entra ID Token.
41-
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsToken';
39+
// URL to your authentication service that retrieves a SAS Token
40+
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsSasToken';
4241

4342
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
4443
}

‎Samples/3D-layer/newyork/newyork.html‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,11 @@
5454

5555
//Add your Azure Maps subscription client ID to the map SDK. Get an Azure Maps client ID at https://azure.com/maps
5656
authOptions: {
57-
//Use Microsoft Entra ID authentication.
58-
authType: 'anonymous',
59-
clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', //Your Azure Maps client id for accessing your Azure Maps account.
57+
// Use SAS token for authentication
58+
authType: 'sas',
6059
getToken: function (resolve, reject, map) {
61-
//URL to your authentication service that retrieves an Microsoft Entra ID Token.
62-
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsToken';
60+
// URL to your authentication service that retrieves a SAS Token
61+
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsSasToken';
6362

6463
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
6564
}

‎Samples/3D-layer/three.js/three.js.html‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,11 @@
154154

155155
// Add authentication details for connecting to Azure Maps.
156156
authOptions: {
157-
// Use Microsoft Entra ID authentication.
158-
authType: 'anonymous',
159-
clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', // Your Azure Maps client id for accessing your Azure Maps account.
157+
// Use SAS token for authentication
158+
authType: 'sas',
160159
getToken: function (resolve, reject, map) {
161-
// URL to your authentication service that retrieves an Microsoft Entra ID Token.
162-
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsToken';
160+
// URL to your authentication service that retrieves a SAS Token
161+
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsSasToken';
163162

164163
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
165164
}

‎Samples/Animations/Animate a GPS trace/Animate a GPS trace.html‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,11 @@
7878

7979
//Add authentication details for connecting to Azure Maps.
8080
authOptions: {
81-
//Use Microsoft Entra ID authentication.
82-
authType: 'anonymous',
83-
clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', //Your Azure Maps client id for accessing your Azure Maps account.
81+
// Use SAS token for authentication
82+
authType: 'sas',
8483
getToken: function (resolve, reject, map) {
85-
//URL to your authentication service that retrieves an Microsoft Entra ID Token.
86-
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsToken';
84+
// URL to your authentication service that retrieves a SAS Token
85+
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsSasToken';
8786

8887
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
8988
}

‎Samples/Animations/Animate a Line/Animate a Line.html‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@
3333

3434
//Add authentication details for connecting to Azure Maps.
3535
authOptions: {
36-
//Use Microsoft Entra ID authentication.
37-
authType: 'anonymous',
38-
clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', //Your Azure Maps client id for accessing your Azure Maps account.
36+
// Use SAS token for authentication
37+
authType: 'sas',
3938
getToken: function (resolve, reject, map) {
40-
//URL to your authentication service that retrieves an Microsoft Entra ID Token.
41-
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsToken';
39+
// URL to your authentication service that retrieves a SAS Token
40+
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsSasToken';
4241

4342
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
4443
}

‎Samples/Animations/Animate a choropleth map/Animate a choropleth map.html‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@
3434

3535
//Add authentication details for connecting to Azure Maps.
3636
authOptions: {
37-
// Use Microsoft Entra ID authentication.
38-
authType: 'anonymous',
39-
clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', //Your Azure Maps client id for accessing your Azure Maps account.
37+
// Use SAS token for authentication
38+
authType: 'sas',
4039
getToken: function (resolve, reject, map) {
41-
//URL to your authentication service that retrieves an Microsoft Entra ID Token.
42-
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsToken';
40+
// URL to your authentication service that retrieves a SAS Token
41+
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsSasToken';
4342

4443
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
4544
}

‎Samples/Animations/Animate a snakeline/Animate a snakeline.html‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,11 @@
5454

5555
//Add authentication details for connecting to Azure Maps.
5656
authOptions: {
57-
//Use Microsoft Entra ID authentication.
58-
authType: 'anonymous',
59-
clientId: 'e6b6ab59-eb5d-4d25-aa57-581135b927f0', //Your Azure Maps client id for accessing your Azure Maps account.
57+
// Use SAS token for authentication
58+
authType: 'sas',
6059
getToken: function (resolve, reject, map) {
61-
//URL to your authentication service that retrieves an Microsoft Entra ID Token.
62-
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsToken';
60+
// URL to your authentication service that retrieves a SAS Token
61+
var tokenServiceUrl = 'https://samples.azuremaps.com/api/GetAzureMapsSasToken';
6362

6463
fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
6564
}

0 commit comments

Comments
 (0)