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
- 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
Copy file name to clipboardExpand all lines: README.md
+5-45Lines changed: 5 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ For more information about how the protocols work in this scenario and other sce
18
18
## How To Run This Sample
19
19
20
20
To run this sample you will need:
21
-
- Visual Studio 2013
21
+
- Visual Studio 2017
22
22
- An Internet connection
23
23
- 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/)
24
24
- 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
58
58
59
59
#### Configure the TodoListService-ManualJwt project
60
60
61
-
1. Open the solution in Visual Studio 2013.
61
+
1. Open the solution in Visual Studio.
62
62
2. Open the `web.config` file.
63
63
3. Find the app key `ida:Tenant` and replace the value with your AAD tenant name.
64
64
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
72
72
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`
73
73
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`.
74
74
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`:
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
112
76
113
77
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.
114
78
115
79
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.
116
80
117
-
## How To Deploy This Sample to Azure
118
-
119
-
Coming soon.
120
-
121
81
## About The Code
122
82
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.
124
84
125
85
## How To Recreate This Sample
126
86
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.
128
88
129
89
### Creating the TodoListService-ManualJwt Project
0 commit comments