There is a very simple 2 page website. first is login page where we can enter username and password, and the second page shows "welcome" after authentication..
Is there any design pattern that we can use for this?
I am not able think of a design pattern for such a simple website, but just wanted to get your thoughts.
One of my colleague asked this question to me!
Logging is usually implemented with the Chain of responsibility pattern.
4 Design Patterns You Should Know for Web Development: Observer, Singleton, Strategy, and Decorator.
Secure design patterns are meant to eliminate the accidental insertion of vulnerabilities into code and to mitigate the consequences of these vulnerabilities.
Yes, the interceptor pattern (or intercepting filter) comes to mind: a central filter should intercept all the requests to authentication-protected pages of the application and redirect to the login page if the user is not authenticated yet.
And if the user is already authenticated, it should let the request go to its original target.
Note that it's much more user-friendly to not redirect to a welcome page after authentication, but to the originally-requested page:
Note that I know nothing about asp.net, so this pattern might be easy to implement or very hard: I have no idea. Java EE webapps have this notion of filters which are typically used for authentication, the way described above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With