You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/spring-apps/includes/quickstart-deploy-restful-api-app/quickstart-tool-introduction.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,5 +14,5 @@ Use the following line at the end of the heading Prerequisites, with blank lines
14
14
15
15
The following list describes the different options of creating resources and deploying applications in Azure Spring Apps:
16
16
17
-
- Azure portal: Use the Azure portal to create resources and deploy applications step by step. The Azure portal is suitable for developers who are using Azure Cloud Services for the first time.
18
-
- Azure Developer CLI: Use the Azure Developer CLI to create resources and deploy applications through simple commands, and to cover application code and infrastructure as code files needed to provision the Azure resources. The Azure Developer CLI is suitable for developers who are familiar with Azure Cloud Services.
17
+
- Azure portal: Use the Azure portal to create resources and deploy applications step by step. The Azure portal is suitable for developers who are using Azure cloud services for the first time.
18
+
- Azure Developer CLI: Use the Azure Developer CLI to create resources and deploy applications through simple commands, and to cover application code and infrastructure as code files needed to provision the Azure resources. The Azure Developer CLI is suitable for developers who are familiar with Azure cloud services.
Copy file name to clipboardExpand all lines: articles/spring-apps/quickstart-deploy-restful-api-app.md
+33-37Lines changed: 33 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,17 +23,17 @@ This article describes how to deploy a RESTful API application protected by [Mic
23
23
24
24
These RESTful APIs are protected by applying role-based access control (RBAC). Anonymous users can't access any data and aren't allowed to control access for different users. Anonymous users only have the following three permissions:
25
25
26
-
- Read: With this permission, can read the ToDo data.
27
-
- Write: With this permission, can add or update the ToDo data.
28
-
- Delete: With this permission, can delete the ToDo data.
26
+
- Read: With this permission, a user can read the ToDo data.
27
+
- Write: With this permission, a user can add or update the ToDo data.
28
+
- Delete: With this permission, a user can delete the ToDo data.
29
29
30
30
After the deployment is successful, you can view and test the APIs through the Swagger UI.
31
31
32
32
:::image type="content" source="media/quickstart-deploy-restful-api-app/swagger-ui.png" alt-text="Image that shows the API document of Swagger UI." lightbox="media/quickstart-deploy-restful-api-app/swagger-ui.png":::
33
33
34
34
The following diagram shows the architecture of the system:
35
35
36
-
:::image type="content" source="media/quickstart-deploy-restful-api-app/diagram.png" alt-text="Image that shows the architecture of a Spring web application." lightbox="media/quickstart-deploy-restful-api-app/diagram.png":::
36
+
:::image type="content" source="media/quickstart-deploy-restful-api-app/diagram.png" alt-text="Diagram that shows the architecture of a Spring web application." lightbox="media/quickstart-deploy-restful-api-app/diagram.png":::
@@ -66,11 +66,11 @@ Now, you can access the RESTful API to see if it works.
66
66
67
67
### Request an access token
68
68
69
-
The RESTful APIs act as a resource server, which is protected by Microsoft Entra ID. Before acquiring an access token, it's required to register another application and grant permissions to the client application, which is named `ToDoWeb`.
69
+
The RESTful APIs act as a resource server, which is protected by Microsoft Entra ID. Before acquiring an access token, you're required to register another application in Microsoft Entra ID and grant permissions to the client application, which is named `ToDoWeb`.
70
70
71
71
#### Register the client application
72
72
73
-
Use the following steps to register an application in Microsoft Entra ID, which is used to add the permissions of app`ToDo`:
73
+
Use the following steps to register an application in Microsoft Entra ID, which is used to add the permissions for the`ToDo` app:
74
74
75
75
1. Sign in to the [Azure portal](https://portal.azure.com/).
76
76
@@ -80,31 +80,31 @@ Use the following steps to register an application in Microsoft Entra ID, which
80
80
81
81
1. Under **Manage**, select **App registrations** > **New registration**.
82
82
83
-
1. Enter a name for your application in the **Name** field, for example *ToDoWeb*. Users of your app might see this name, and you can change it later.
83
+
1. Enter a name for your application in the **Name** field - for example,*ToDoWeb*. Users of your app might see this name, and you can change it later.
84
84
85
-
1. For **Supported account types**, use the default **Accounts in this organizational directory only**.
85
+
1. For **Supported account types**, use the default value **Accounts in this organizational directory only**.
86
86
87
87
1. Select **Register** to create the application.
88
88
89
-
1. On the app **Overview** page, look for the **Application (client) ID** value, and then record it for later use. You need it to acquire access token.
89
+
1. On the app **Overview** page, look for the **Application (client) ID** value, and then record it for later use. You need it to acquire an access token.
90
90
91
-
1. Select **API permissions** > **Add a permission** > **My APIs**. Select the `ToDo` application that you registered earlier, and then select the permissions **ToDo.Read**, **ToDo.Write**, and **ToDo.Delete**. Select **Add permissions**.
91
+
1. Select **API permissions** > **Add a permission** > **My APIs**. Select the `ToDo` application that you registered earlier, and then select the **ToDo.Read**, **ToDo.Write**, and **ToDo.Delete** permissions. Select **Add permissions**.
92
92
93
-
1. Select **Grant admin consent for {your-tenant-name}** to grant admin consent for the permissions you added.
93
+
1. Select **Grant admin consent for \<your-tenant-name>** to grant admin consent for the permissions you added.
94
94
95
-
:::image type="content" source="media/quickstart-deploy-restful-api-app/api-permissions.png" alt-text="Image that shows the API permissions of a web application." lightbox="media/quickstart-deploy-restful-api-app/api-permissions.png":::
95
+
:::image type="content" source="media/quickstart-deploy-restful-api-app/api-permissions.png" alt-text="Screenshot of the Azure portal that shows the API permissions of a web application." lightbox="media/quickstart-deploy-restful-api-app/api-permissions.png":::
96
96
97
97
#### Add user to access the RESTful APIs
98
98
99
-
Use the following steps to create a member user in your Microsoft Entra ID, then the user can manage the data of the `ToDo` application through RESTful APIs.
99
+
Use the following steps to create a member user in your Microsoft Entra ID tenant. Then, the user can manage the data of the `ToDo` application through RESTful APIs.
100
100
101
101
1. Under **Manage**, select **Users** > **New user** > **Create new user**.
102
102
103
103
1. On the **Create new user** page, enter the following information:
104
104
105
-
-**User principal name**: Enter a name for the user.
106
-
-**Display name**: Enter a display name for the user.
107
-
-**Password**: Copy the autogenerated password provided in the **Password** box.
105
+
-**User principal name**: Enter a name for the user.
106
+
-**Display name**: Enter a display name for the user.
107
+
-**Password**: Copy the autogenerated password provided in the **Password** box.
108
108
109
109
> [!NOTE]
110
110
>
@@ -115,43 +115,43 @@ Use the following steps to create a member user in your Microsoft Entra ID, then
115
115
116
116
#### Update the OAuth2 configuration for Swagger UI authorization
117
117
118
-
Use the following steps to update the OAuth2 configuration for Swagger UI authorization, then you can authorize users through the app `ToDoWeb`to acquire access tokens.
118
+
Use the following steps to update the OAuth2 configuration for Swagger UI authorization. Then, you can authorize users to acquire access tokens through the `ToDoWeb`app.
119
119
120
120
1. Open the Azure Spring Apps instance in the Azure portal.
121
121
122
-
1. Open your **Microsoft Entra ID** tenant in the Azure portal, and go to the registered app `ToDoWeb`.
122
+
1. Open your **Microsoft Entra ID** tenant in the Azure portal, and go to the registered `ToDoWeb` app.
123
123
124
124
1. Under **Manage**, select **Authentication**, select **Add a platform**, and then select **Single-page application**.
125
125
126
-
1. Use the format `<your-app-exposed-application-url-or-endpoint>/swagger-ui/oauth2-redirect.html` as the OAuth2 redirect url in the **Redirect URIs** field, such as `https://simple-todo-api.xxxxxxxx-xxxxxxxx.xxxxxx.azurecontainerapps.io/swagger-ui/oauth2-redirect.html`, and then select **Configure**.
126
+
1. Use the format `<your-app-exposed-application-url-or-endpoint>/swagger-ui/oauth2-redirect.html` as the OAuth2 redirect URL in the **Redirect URIs** field - for example, `https://simple-todo-api.xxxxxxxx-xxxxxxxx.xxxxxx.azurecontainerapps.io/swagger-ui/oauth2-redirect.html` - and then select **Configure**.
127
127
128
-
:::image type="content" source="media/quickstart-deploy-restful-api-app/aad-spa-auth.png" alt-text="Image that shows the SPA authentication in Microsoft Entra ID." lightbox="media/quickstart-deploy-restful-api-app/aad-spa-auth.png":::
128
+
:::image type="content" source="media/quickstart-deploy-restful-api-app/aad-spa-auth.png" alt-text="Screenshot of the Azure portal that shows the Authentication page for Microsoft Entra ID." lightbox="media/quickstart-deploy-restful-api-app/aad-spa-auth.png":::
129
129
130
130
#### Obtain the access token
131
131
132
-
Use the following steps to use [OAuth 2.0 authorization code flow](../active-directory/develop/v2-oauth2-auth-code-flow.md) method to obtain an access token in Microsoft Entra ID, then access the RESTful APIs of the app `ToDo`.
132
+
Use the following steps to use [OAuth 2.0 authorization code flow](../active-directory/develop/v2-oauth2-auth-code-flow.md) method to obtain an access token with Microsoft Entra ID, then access the RESTful APIs of the `ToDo` app:
133
133
134
134
1. Open the URL exposed by the app, then select **Authorize** to prepare the OAuth2 authentication.
135
135
136
-
1. In the **Available authorizations** window, enter the client ID of the app `ToDoWeb` in the **client_id** field, select all the scopes for **Scopes** field, ignore the **client_secret** field, and then select **Authorize** to redirect to the Microsoft Entra ID login page.
136
+
1. In the **Available authorizations** window, enter the client ID of the `ToDoWeb`app in the **client_id** field, select all the scopes for **Scopes** field, ignore the **client_secret** field, and then select **Authorize** to redirect to the Microsoft Entra ID sign-in page.
137
137
138
138
1. After completing the login with the previous user, you'll return to the following pop-up window:
139
139
140
140
:::image type="content" source="media/quickstart-deploy-restful-api-app/swagger-ui-logged.png" alt-text="Image that shows the logged in window of Swagger UI authorization." lightbox="media/quickstart-deploy-restful-api-app/swagger-ui-logged.png":::
141
141
142
142
### Access the RESTful APIs
143
143
144
-
Use the following steps to access the RESTful APIs of the app `ToDo` in Swagger UI.
144
+
Use the following steps to access the RESTful APIs of the `ToDo`app in the Swagger UI:
145
145
146
-
1. Select the API **POST /api/simple-todo/lists** and select **Try it out**. Enter the following request body, and then select **Execute** to create a ToDo list.
146
+
1. Select the API **POST /api/simple-todo/lists** and then select **Try it out**. Enter the following request body, and then select **Execute** to create a ToDo list.
147
147
148
148
```json
149
149
{
150
-
"name": "My List"
150
+
"name": "My List"
151
151
}
152
152
```
153
153
154
-
After the execution is complete, you'll see the following **Response body**:
154
+
After the execution is complete, you see the following **Response body**:
155
155
156
156
```json
157
157
{
@@ -161,7 +161,7 @@ Use the following steps to access the RESTful APIs of the app `ToDo` in Swagger
161
161
}
162
162
```
163
163
164
-
1. Select the API **POST /api/simple-todo/lists/{listId}/items** and select **Try it out**. For **listId**, enter the ToDo list ID you created previously, enter the following request body, and then select **Execute** to create a ToDo item.
164
+
1. Select the API **POST /api/simple-todo/lists/{listId}/items** and then select **Try it out**. For **listId**, enter the ToDo list ID you created previously, enter the following request body, and then select **Execute** to create a ToDo item.
165
165
166
166
```json
167
167
{
@@ -171,7 +171,7 @@ Use the following steps to access the RESTful APIs of the app `ToDo` in Swagger
171
171
}
172
172
```
173
173
174
-
Enter the following command to return the ToDo item:
174
+
This action returns the following ToDo item:
175
175
176
176
```json
177
177
{
@@ -185,9 +185,7 @@ Use the following steps to access the RESTful APIs of the app `ToDo` in Swagger
185
185
}
186
186
```
187
187
188
-
1. Select the API **GET /api/simple-todo/lists** and select **Execute** to query ToDo lists.
189
-
190
-
Enter the following command to return the ToDo lists:
188
+
1. Select the API **GET /api/simple-todo/lists** and then select **Execute** to query ToDo lists. This action returns the following ToDo lists:
191
189
192
190
```json
193
191
[
@@ -199,9 +197,7 @@ Use the following steps to access the RESTful APIs of the app `ToDo` in Swagger
199
197
]
200
198
```
201
199
202
-
1. Select the API **GET /api/simple-todo/lists/{listId}/items** and select **Try it out**. For **listId**, enter the ToDo list ID you created previously, and then select **Execute** to query ToDo items.
203
-
204
-
Enter the following command to return the ToDo item:
200
+
1. Select the API **GET /api/simple-todo/lists/{listId}/items** and then select **Try it out**. For **listId**, enter the ToDo list ID you created previously, and then select **Execute** to query the ToDo items. This action returns the following ToDo item:
205
201
206
202
```json
207
203
[
@@ -217,7 +213,7 @@ Use the following steps to access the RESTful APIs of the app `ToDo` in Swagger
217
213
]
218
214
```
219
215
220
-
1. Select the API **PUT /api/simple-todo/lists/{listId}/items/{itemId}** and select **Try it out**. For **listId**, enter the ToDo list ID. For **itemId**, enter the ToDo item ID, enter the following request body, and then select **Execute** to update the ToDo item.
216
+
1. Select the API **PUT /api/simple-todo/lists/{listId}/items/{itemId}** and then select **Try it out**. For **listId**, enter the ToDo list ID. For **itemId**, enter the ToDo item ID, enter the following request body, and then select **Execute** to update the ToDo item.
221
217
222
218
```json
223
219
{
@@ -230,7 +226,7 @@ Use the following steps to access the RESTful APIs of the app `ToDo` in Swagger
230
226
}
231
227
```
232
228
233
-
Enter the following command to return the new ToDo item:
229
+
This action returns the following updated ToDo item:
234
230
235
231
```json
236
232
{
@@ -244,7 +240,7 @@ Use the following steps to access the RESTful APIs of the app `ToDo` in Swagger
244
240
}
245
241
```
246
242
247
-
1. Select the API **DELETE /api/simple-todo/lists/{listId}/items/{itemId}** and select **Try it out**. For **listId**, enter the ToDo list ID. For **itemId**, enter the ToDo item ID, and then select **Execute** to delete the ToDo item. You should see that the server response code is `204`.
243
+
1. Select the API **DELETE /api/simple-todo/lists/{listId}/items/{itemId}** and then select **Try it out**. For **listId**, enter the ToDo list ID. For **itemId**, enter the ToDo item ID, and then select **Execute** to delete the ToDo item. You should see that the server response code is `204`.
Copy file name to clipboardExpand all lines: articles/spring-apps/quickstart-deploy-web-app.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,10 +36,10 @@ The following diagram shows the architecture of the system:
36
36
37
37
::: zone pivot="sc-consumption-plan,sc-standard"
38
38
39
-
The following list describes the different options of creating resources and deploying applications in Azure Spring Apps:
39
+
This article describes the following options for creating resources deploying them to Azure Spring Apps:
40
40
41
-
- Azure portal: Use the Azure portal to create resources and deploy applications step by step. The Azure portal is suitable for developers who are using Azure Cloud Services for the first time.
42
-
- Azure Developer CLI: Use the Azure Developer CLI to create resources and deploy applications through simple commands, and to cover application code and infrastructure as code files needed to provision the Azure resources. The Azure Developer CLI is suitable for developers who are familiar with Azure Cloud Services.
41
+
- Azure portal: Use the Azure portal to create resources and deploy applications step by step. The Azure portal is suitable for developers who are using Azure cloud services for the first time.
42
+
- Azure Developer CLI: Use the Azure Developer CLI to create resources and deploy applications through simple commands, and to cover application code and infrastructure as code files needed to provision the Azure resources. The Azure Developer CLI is suitable for developers who are familiar with Azure cloud services.
0 commit comments