Commit b1b0b4b
Microsoft.Identity.Web refactor (#272)
* Renamings:
- AddMicrosoftIdentityPlatformAuthentication => AddSignIn
- AddMsal => AddWebAppCallProtectedWebApi
* More renaming for consistency
* Updating the README.md with a breaking changes section
* Attempt to move to pure OIDC and JwtBearer implementation (dropping the comfort AzureAD layers)
This code does not work yet ....
* Raw OIDC configuration suggestion
* missing commit
* Using AzureAD appsettings section
* Experimenting UI as external RazorLibrary project
* fix some comments and namings (#244)
* Removing AzureADOptions class
* Added missing OpenIdConnectOptions binding
Added logic to check if authority has v2.0 before modifying it
* removed Microsoft.AspNetCore.Authentication.AzureAD.UI reference from web project
* reversing testing method
* Commented non-working method
* Partial changes for B2C login
* Fixes for B2C sign-in
* Fixed B2C NameClaimType to "name"
* Renaming2 (#269)
* Renaming GetAccessTokenOnBehalfOfUserAsync into GetAccessTokenForUserAsync
as the OnBehalfOfUser was telling too much about OBO, whereas in the case of a Web App this was not the OBO flow.
* Addressing PR feedback
* New class MicrosoftIdentityOptions, so we can merge AAD and B2C options in the same class
Add AuthorityHelpers
Helper method to check if authority is V2
Helper method to build AAD or B2C AuthorityHelpers
Refactored AddSignIn so parameters shows in a logical order
* Attempt to merge B2C and AAD acquireToken logic
* Allowing multiple OIDC schemes to be configured
* Added B2C ResetPassword and EditProfile in UI project
Added B2C exclusive OIDC event handlers
Fixed 1-5 samples to use Microsoft.Identity.UI project
* Added comments and preparation for PR
* Preparation for PR
* Havin the authority in the appsettings is not mandatory
* Fixed sample 5-1 to use refactored code
* missing commit
* Samples 5-2 to use refactored code
* Moved samesite cookie logic to CookiePolicyOptionsExtensions class
* Gitignore for test project
* Added IsV2Authority tests
* Added license info
* Added BuildAuthority unit tests
* Addressing PR reviews
* Added B2C tests on AadIssuerValidatorTests
* Renaming policy to userFlow
* Fix spelling mistakes
* Added missing error page in UI project
* Addressing PR comments about overwriting custom OIDC and JWT events from the developer
* Fixed MT scenarios
Fixed broken unit test
Added b2c NameClaimType config inside AddSignIn
* Fixed all samples in folder 1 to use refactored code
* Updated all samples to use new code
* Renaming policy to user flow
* Added B2C Password Reset Policy
Added B2C Password Reset Policy ID to app settings.
* Moving Web app calling Web API to its own sub folder
* Jmprieur/webappwebapib2c (#298)
* Experiment for a B2C Web app calling a B2C Web API.
Needs more work.
* Test and fix B2C web app calls web api scenario
Fix issue in AadIssuerValidator when certains claims are not present (ex. policy) in the token
Fix bug w/scopes and scopeKeySection
Send "client_info=1" to request to get client info back from AAD B2C
Add ClientInfo class + methods to pull out the TenantId from the ClientInfo
Add full value to UserFlow as it was not picking up on short version
In TokenAcquisition, check first for b2c and then do null tenant and then tenant specific, was using the wrong authority for b2c previously
Fix bug in determining audience validation
* Fixing missing references
* Uncommenting a needed line
* Fixing a build break
* Fixing the configuration and a problem brought bad a by merge by jmprieur
* add uitid to the claims for b2c
* moving Web app calling Web API with B2C in own folder
* Reading the 4-1-MyOrg folder
* Update README.md
Co-authored-by: jennyf19 <jeferrie@microsoft.com>
* - Cleaned appsettings
- Removed DisallowsSameSiteNone from WebAppServiceCollectionExtensions because it got moved to another class
- Added edit profile button on login bar
- Fixed merge on AuthorizeForScopesAttribute
- Added options.TokenValidationParameters.NameClaimType = "name" on web api Startup to fix todo list
* Added older role claim const
* Added policy on APIs to check for scope 'read'
* Refactored scopes policy
* Renamings and PR comments
* Fixing the failing unit test (because the tenant ID is now retrieved from the issuer) (#302)
Co-authored-by: Jean-Marc Prieur <jmprieur@microsoft.com>
Co-authored-by: jennyf19 <jeferrie@microsoft.com>
Co-authored-by: pmaytak <34331512+pmaytak@users.noreply.github.com>1 parent b940672 commit b1b0b4b
File tree
286 files changed
+29118
-728
lines changed- 1-WebApp-OIDC
- 1-1-MyOrg
- 1-2-AnyOrg
- 1-3-AnyOrgOrPersonal
- 1-4-Sovereign
- 1-5-B2C
- 1-6-SignOut
- 2-WebApp-graph-user
- 2-1-Call-MSGraph
- Controllers
- Properties
- 2-2-TokenCache
- Controllers
- 2-3-Multi-Tenant
- Controllers
- 2-4-Sovereign-Call-MSGraph
- Controllers
- 3-WebApp-multi-APIs
- Controllers
- 4-WebApp-your-API
- 4-1-MyOrg
- .vs/WebApp-Calls-WebAPI-MyOrg/config
- AppCreationScripts
- Client
- Controllers
- Infrastructure
- Models
- Properties
- Services
- Views
- Home
- TodoList
- wwwroot
- css
- images
- js
- lib
- bootstrap
- dist
- css
- fonts
- js
- jquery-validation-unobtrusive
- jquery-validation
- dist
- jquery
- dist
- ReadmeFiles
- TodoListService
- Controllers
- Models
- Properties
- 4-2-B2C
- Client
- Controllers
- Infrastructure
- Models
- Properties
- Services
- Views
- Home
- TodoList
- wwwroot
- css
- images
- js
- lib
- bootstrap
- dist
- css
- fonts
- js
- jquery-validation-unobtrusive
- jquery-validation
- dist
- jquery
- dist
- ReadmeFiles
- TodoListService
- AuthorizationPolicies
- Controllers
- Models
- Properties
- 5-WebApp-AuthZ
- 5-1-Roles
- Controllers
- 5-2-Groups
- Controllers
- Microsoft.Identity.Web.Test
- Microsoft.Identity.Web.UI
- Areas/MicrosoftIdentity
- Controllers
- Pages
- Account
- Microsoft.Identity.Web
- Resource
- TokenCacheProviders
- Distributed
- InMemory
- Session
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
286 files changed
+29118
-728
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| 130 | + | |
| 131 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
43 | | - | |
44 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
43 | | - | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
0 commit comments