Skip to content

Commit 946603a

Browse files
authored
Improving the README.md
- replacing VS 2013 by VS 2017 or just VS - removing the Step4 which was about IIS certificate (it's not longer neeed) - removed the coming soon - added a description of the validation
1 parent b66de3c commit 946603a

File tree

1 file changed

+5
-45
lines changed

1 file changed

+5
-45
lines changed

README.md

Lines changed: 5 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For more information about how the protocols work in this scenario and other sce
1818
## How To Run This Sample
1919

2020
To run this sample you will need:
21-
- Visual Studio 2013
21+
- Visual Studio 2017
2222
- An Internet connection
2323
- An Azure Active Directory (Azure AD) tenant. For more information on how to get an Azure AD tenant, please see [How to get an Azure AD tenant](https://azure.microsoft.com/en-us/documentation/articles/active-directory-howto-tenant/)
2424
- A user account in your Azure AD tenant. This sample will not work with a Microsoft account, so if you signed in to the Azure portal with a Microsoft account and have never created a user account in your directory before, you need to do that now.
@@ -58,7 +58,7 @@ There are two projects in this sample. Each needs to be separately registered i
5858

5959
#### Configure the TodoListService-ManualJwt project
6060

61-
1. Open the solution in Visual Studio 2013.
61+
1. Open the solution in Visual Studio.
6262
2. Open the `web.config` file.
6363
3. Find the app key `ida:Tenant` and replace the value with your AAD tenant name.
6464
4. Find the app key `ida:Audience` and replace the value with the App ID URI you registered earlier, for example `https://<your_tenant_name>/TodoListService-ManualJwt`.
@@ -72,59 +72,19 @@ There are two projects in this sample. Each needs to be separately registered i
7272
5. Find the app key `todo:TodoListResourceId` and replace the value with the App ID URI of the TodoListService-ManualJwt project, for example `https://<your_tenant_name>/TodoListService-ManualJwt`
7373
6. Find the app key `todo:TodoListBaseAddress` and replace the value with the base address of the TodoListService-ManualJwt project, for example `https://localhost:44324`.
7474

75-
### Step 4: Trust the IIS Express SSL certificate
76-
77-
Since the web API is SSL protected, the client of the API (the web app) will refuse the SSL connection to the web API unless it trusts the API's SSL certificate. Use the following steps in Windows Powershell to trust the IIS Express SSL certificate. You only need to do this once. If you fail to do this step, calls to the TodoListService-ManualJwt web API will always throw an unhandled exception where the inner exception message is:
78-
79-
"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."
80-
81-
To configure your computer to trust the IIS Express SSL certificate, begin by opening a Windows Powershell command window as Administrator.
82-
83-
Query your personal certificate store to find the thumbprint of the certificate for `CN=localhost`:
84-
85-
```
86-
PS C:\windows\system32> dir Cert:\LocalMachine\My
87-
88-
89-
Directory: Microsoft.PowerShell.Security\Certificate::LocalMachine\My
90-
91-
92-
Thumbprint Subject
93-
---------- -------
94-
C24798908DA71693C1053F42A462327543B38042 CN=localhost
95-
```
96-
97-
Next, add the certificate to the Trusted Root store:
98-
99-
```
100-
PS C:\windows\system32> $cert = (get-item cert:\LocalMachine\My\C24798908DA71693C1053F42A462327543B38042)
101-
PS C:\windows\system32> $store = (get-item cert:\Localmachine\Root)
102-
PS C:\windows\system32> $store.Open("ReadWrite")
103-
PS C:\windows\system32> $store.Add($cert)
104-
PS C:\windows\system32> $store.Close()
105-
```
106-
107-
You can verify the certificate is in the Trusted Root store by running this command:
108-
109-
`PS C:\windows\system32> dir Cert:\LocalMachine\Root`
110-
111-
### Step 5: Run the sample
75+
### Step 4: Run the sample
11276

11377
Clean the solution, rebuild the solution, and run it. You might want to go into the solution properties and set both projects as startup projects, with the service project starting first.
11478

11579
Explore the sample by signing in, adding items to the To Do list, removing the user account, and starting again. Notice that if you stop the application without removing the user account, the next time you run the application you won't be prompted to sign-in again - that is the sample implements a persistent cache for ADAL, and remembers the tokens from the previous run.
11680

117-
## How To Deploy This Sample to Azure
118-
119-
Coming soon.
120-
12181
## About The Code
12282

123-
Coming soon.
83+
The manual JWT validation occurs in the [TokenValidationHandler](https://github.com/Azure-Samples/active-directory-dotnet-webapi-manual-jwt-validation/blob/master/TodoListService-ManualJwt/Global.asax.cs#L58) implementation in the `Global.aspx.cs` file in the TodoListService-ManualJwt project.
12484

12585
## How To Recreate This Sample
12686

127-
First, in Visual Studio 2013 create an empty solution to host the projects. Then, follow these steps to create each project.
87+
First, in Visual Studio 2017 create an empty solution to host the projects. Then, follow these steps to create each project.
12888

12989
### Creating the TodoListService-ManualJwt Project
13090

0 commit comments

Comments
 (0)