Skip to content

fix some comments and namings #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2020
Merged

fix some comments and namings #244

merged 1 commit into from
Jan 8, 2020

Conversation

jennyf19
Copy link
Contributor

No description provided.

@jennyf19 jennyf19 requested a review from jmprieur December 31, 2019 20:50
Copy link
Contributor

@jmprieur jmprieur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much @jennyf19
This is great!

@@ -24,8 +24,8 @@ public static ClaimsPrincipal ToClaimsPrincipal(this IAccount account)
return new ClaimsPrincipal(
new ClaimsIdentity(new Claim[]
{
new Claim(ClaimConstants.Oid, account.HomeAccountId.ObjectId),
new Claim(ClaimConstants.Tid, account.HomeAccountId.TenantId),
new Claim(ClaimConstants.Oid, account.HomeAccountId?.ObjectId),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we even add the claims if the HomeAccountId is null?

@jmprieur jmprieur merged commit 794daae into renaming Jan 8, 2020
@jmprieur jmprieur deleted the jennyf/random branch January 8, 2020 09:40
jmprieur added a commit that referenced this pull request Feb 19, 2020
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants