yos mishan
yos mishan

Reputation: 193

Servicestack security over mvc on n-tier layer application

One of the biggest disadvantages of .net security is that the security annotations does not live outside of the mvc controller.

CustomerController calls CustomerService calls CustomerRepository

each of the above are in a different dll. I want to secure CustomerService with annotations and not CustomerController.

  1. Is it possible to do on servicestack? is it good practice?
  2. Is there any example of n-tier architecture example with servicestack?

thanks

Upvotes: 2

Views: 180

Answers (1)

paaschpa
paaschpa

Reputation: 4816

Is it possible to do on servicestack? is it good practice?
Within ServiceStack you can apply authentication/authorization attributes at different levels (Request Dto, Service Action, Service class or a Serivce's base class) . You can also create Filter Attributes as well.

Is there any example of n-tier architecture example with servicestack?
This is not so much an example but the structure of a typical layout of a ServiceStack project.

Upvotes: 1

Related Questions