Fixed #1495 bug : UseLoadTest missing claimsType (#1508)

* Update ByPassAuthMiddleware.cs

* Update ByPassAuthMiddleware.cs

* remove WebMVC/ByPassAuthMiddleware duplicate cliam

* remove Ordering.API/ByPassAuthMid  duplicate cliam

* remove Location.API/ByPassAuthMid  duplicate cliam

* remove Market.API/ByPassAuthMid  duplicate cliam

* change webmvc bypassauth: claimType of sub

* change ordering bypassauth: claimType of sub

* change location bypassauth: claimType of sub

* change market bypassauth: claimType of sub
This commit is contained in:
ansonzhang 2020-11-05 06:12:21 -06:00 committed by GitHub
parent b196622846
commit 388d0b7b5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 14 deletions

View File

@ -61,11 +61,11 @@ namespace Basket.API.Infrastructure.Middlewares
var user = new ClaimsIdentity(new[] { var user = new ClaimsIdentity(new[] {
new Claim("emails", currentUserId), new Claim("emails", currentUserId),
new Claim("name", "Test user"), new Claim("name", "Test user"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"),
new Claim("nonce", Guid.NewGuid().ToString()), new Claim("nonce", Guid.NewGuid().ToString()),
new Claim("ttp://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"),
new Claim("nonce", Guid.NewGuid().ToString()),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"),
new Claim("sub", "1234"), new Claim("sub", currentUserId),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")}
, "ByPassAuth"); , "ByPassAuth");

View File

@ -61,10 +61,10 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Midd
var user = new ClaimsIdentity(new[] { var user = new ClaimsIdentity(new[] {
new Claim("emails", currentUserId), new Claim("emails", currentUserId),
new Claim("name", "Test user"), new Claim("name", "Test user"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"),
new Claim("nonce", Guid.NewGuid().ToString()), new Claim("nonce", Guid.NewGuid().ToString()),
new Claim("ttp://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"),
new Claim("nonce", Guid.NewGuid().ToString()), new Claim("sub", currentUserId),
new Claim("sub", "1234"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")}
, "ByPassAuth"); , "ByPassAuth");

View File

@ -60,10 +60,10 @@ namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Midd
var user = new ClaimsIdentity(new[] { var user = new ClaimsIdentity(new[] {
new Claim("emails", currentUserId), new Claim("emails", currentUserId),
new Claim("name", "Test user"), new Claim("name", "Test user"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"),
new Claim("nonce", Guid.NewGuid().ToString()), new Claim("nonce", Guid.NewGuid().ToString()),
new Claim("ttp://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"),
new Claim("nonce", Guid.NewGuid().ToString()), new Claim("sub", currentUserId),
new Claim("sub", "1234"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")}
, "ByPassAuth"); , "ByPassAuth");

View File

@ -61,10 +61,10 @@ namespace Ordering.API.Infrastructure.Middlewares
var user = new ClaimsIdentity(new[] { var user = new ClaimsIdentity(new[] {
new Claim("emails", currentUserId), new Claim("emails", currentUserId),
new Claim("name", "Test user"), new Claim("name", "Test user"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"),
new Claim("nonce", Guid.NewGuid().ToString()), new Claim("nonce", Guid.NewGuid().ToString()),
new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"),
new Claim("nonce", Guid.NewGuid().ToString()), new Claim("sub", currentUserId),
new Claim("sub", "1234"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")}
, "ByPassAuth"); , "ByPassAuth");

View File

@ -62,10 +62,10 @@ namespace WebMVC.Infrastructure.Middlewares
new Claim("emails", currentUserId), new Claim("emails", currentUserId),
new Claim("name", "Test user"), new Claim("name", "Test user"),
new Claim("nonce", Guid.NewGuid().ToString()), new Claim("nonce", Guid.NewGuid().ToString()),
new Claim("ttp://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"),
new Claim("nonce", Guid.NewGuid().ToString()), new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"),
new Claim("sub", "1234"), new Claim("sub", currentUserId),
new Claim("card_expiration", "12/20"), new Claim("card_expiration", "12/20"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")}
, "ByPassAuth"); , "ByPassAuth");