Basket.API project failed to use ByPassAuthMiddleware
See original GitHub issueIf the authentication center identity.API is not enabled, when using the manual default user test, the Claim is reported as an error.
Because when we add a test user in the middleware(file : /src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs), the claim Type of the user Name is ‘name’:
new Claim("name", "Test user"),
new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"),
But in BasketController CheckoutAsync method, using ClaimType is (http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name),
var userName = this.HttpContext.User.FindFirst(x => x.Type == ClaimTypes.Name).Value;
the two do not match.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13 (12 by maintainers)
Top Results From Across the Web
How to fix this error "warn: Microsoft.AspNetCore. ...
Good evening , I am trying to build a simple web api using ASP.Net . The app has been showing the error like...
Read more >"Build failed" on Database First Scaffold-DbContext
Two most important tips: [1] - Make sure that your project builds completely before you run a new scaffold command. Otherwise.
Read more >Errors | HTTP API | commercetools Composable Commerce
Common HTTP error codes returned by the commercetools Composable Commerce APIs and their meaning. Error responses have the same overall structure across the ......
Read more >Standard Error Messages | Search Console API
The request failed because a per-user rate limit has been reached, and the client developer was not identified in the request. Please use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@thanhauco Currently there is no list, but you can modify the bug from the Issue list
The steps are as follows:
1. Download the source code for the Dev branch
2. The basket.API project starts by default
3. Configure EventBus and Redis ConnectionString and set UseLoadTest to true
4. Start Kestrel mode
5. Configure test user’s userid = ‘123456798’
https://localhost:5103/noauth?userid=123456798
6. Add a shopping cart
7, Checkout user ‘123456798’ shopping cart
8. An exception error occurred