0

I am using the Repository/Service pattern with a MVC 3 application.

My question is two fold:

1) Where do you manage the authentication at? In the service layer or in the MVC application itself?

2) Should I be using a custom membership provider and forms authentication?

Thanks, Sam

2 Answers 2

2

In my case, I tend to create an authentication service that handles the logic for this.

In the actual application, I use Forms authentication, but calls to a custom service to handle the details. That way, I can reuse the authentication mechanism(s) for other applications, or trade them out to a different standard altogether, whatever is best.

Sign up to request clarification or add additional context in comments.

Comments

2

The answer is always it depends,

  1. Normally I delegate every tasks to Service Layer including authentication when MVC application is merely one of the many interfaces.
  2. I think you should use it if it fits your requirement

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.