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/active-directory/develop/quickstart-v2-java-webapp.md
+26-13Lines changed: 26 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ To run this sample you will need:
57
57
> - Leave **Redirect URI** blank for now, and select **Register**.
58
58
> 1. On the **Overview** page, find the **Application (client) ID** and the **Directory (tenant) ID** values of the application. Copy these values for later.
59
59
> 1. Select the **Authentication** from the menu, and then add the following information:
60
-
> - In **Redirect URIs**, add `http://localhost:8080/msal4jsample/secure/aad` and `http://localhost:8080/msal4jsample/graph/me`.
60
+
> - In **Redirect URIs**, add `https://localhost:8080/msal4jsample/secure/aad` and `https://localhost:8080/msal4jsample/graph/me`.
61
61
> - Select **Save**.
62
62
> 1. Select the **Certificates & secrets** from the menu and in the **Client secrets** section, click on **New client secret**:
63
63
>
@@ -71,7 +71,7 @@ To run this sample you will need:
71
71
>
72
72
> For the code sample for this quickstart to work, you need to:
73
73
>
74
-
> 1. Add reply URLs as `http://localhost:8080/msal4jsamples/secure/aad` and `http://localhost:8080/msal4jsamples/graph/me`.
74
+
> 1. Add reply URLs as `https://localhost:8080/msal4jsamples/secure/aad` and `https://localhost:8080/msal4jsamples/graph/me`.
@@ -87,23 +87,36 @@ To run this sample you will need:
87
87
88
88
1. Extract the zip file to a local folder.
89
89
1. If you use an integrated development environment, open the sample in your favorite IDE (optional).
90
-
91
90
1. Open the application.properties file, which can be found in src/main/resources/ folder and replace the value of the fields *aad.clientId*, *aad.authority* and *aad.secretKey* with the respective values of **Application Id**, **Tenant Id** and **Client Secret** as the following:
> - `Enter_the_Application_Id_here` - is the Application Id for the application you registered.
105
-
> - `Enter_the_Client_Secret_Here` - is the **Client Secret** you created in **Certificates & Secrets** for the application you registered.
106
-
> - `Enter_the_Tenant_Info_Here` - is the **Directory (tenant) ID** value of the application you registered.
100
+
> [!div renderon="docs"]
101
+
> Where:
102
+
>
103
+
> - `Enter_the_Application_Id_here` - is the Application Id for the application you registered.
104
+
> - `Enter_the_Client_Secret_Here` - is the **Client Secret** you created in **Certificates & Secrets** for the application you registered.
105
+
> - `Enter_the_Tenant_Info_Here` - is the **Directory (tenant) ID** value of the application you registered.
106
+
107
+
1. To use https with localhost, fill in the server.ssl.key properties. To generate a self-signed certificate, use the keytool utility (included in JRE).
Put the generated keystore file in the "resources" folder.
107
120
108
121
#### Step 4: Run the code sample
109
122
@@ -113,11 +126,11 @@ Run it directly from your IDE by using the embedded spring boot server or packag
113
126
114
127
##### Running from IDE
115
128
116
-
If you are running the web application from an IDE, click on run, then navigate to the home page of the project. For this sample, the standard home page URL is http://localhost:8080
129
+
If you are running the web application from an IDE, click on run, then navigate to the home page of the project. For this sample, the standard home page URL is https://localhost:8080.
117
130
118
131
1. On the front page, select the **Login** button to redirect to Azure Active Directory and prompt the user for their credentials.
119
132
120
-
1. After the user is authenticated, they are redirected to *http://localhost:8080/msal4jsample/secure/aad*. They are now signed in, and the page will show information about the signed-in account. The sample UI has the following buttons:
133
+
1. After the user is authenticated, they are redirected to *https://localhost:8080/msal4jsample/secure/aad*. They are now signed in, and the page will show information about the signed-in account. The sample UI has the following buttons:
121
134
- *Sign Out*: Signs the current user out of the application and redirects them to the home page.
122
135
- *Show User Info*: Acquires a token for Microsoft Graph and calls Microsoft Graph with a request containing the token, which returns basic information about the signed-in user.
0 commit comments