In an e-commerce application, you have a controller that manages orders, and it is protected using the [Authorize] attribute. However, you wish to allow a public tracking feature where users can see the status of their order without logging in. How would you implement this?

  • Create a separate controller or action without the [Authorize] attribute for public order tracking.
  • Use client-side authentication to allow access to order tracking.
  • Use a cookie-based authentication mechanism for order tracking.
  • Allow anonymous access to the entire order controller.
To implement a public order tracking feature, you should create a separate controller or action without the [Authorize] attribute. This allows unauthenticated users to access order tracking while keeping the rest of the order management secure with authentication.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *