Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Application - Authentication / Login Framework [closed]

Tags:

This is a very simple, probably a most asked question and frequently developed as part of any web application. Say I'm planning to build a web application and some of the functional requirements include (apart from the usual hard hitting security reqs), - Need to have users sign up for a new account profile - Authenticate user using the native app authentication / Facebook or Google or Yahoo or OpenId login - Allow lost password retrieval - Session handling needs

Is there an out of the box frameworks (Drupal, Liferay, Tapestry with Tynamo, Wicket ??) that I can use to wrap my application which can be a bunch of JSP's or HTML's with JS? I know I'm asking a very simple and maybe a naive question. But this is a topic every web developer guru will go thru. Any help, advise and pointers much appreciated.

like image 752
user456563 Avatar asked Jan 16 '11 17:01

user456563


People also ask

What is the best authentication method for web application?

For web applications that leverage server-side templating, session-based auth via username and password is often the most appropriate. You can add OAuth and OpenID as well. For RESTful APIs, token-based authentication is the recommended approach since it's stateless.

How does web application authentication work?

Authentication is the process of verifying the identity of an individual. A user can interact with a web application using multiple actions. Access to certain actions or pages can be restricted using user levels. Authorization is the process of controlling user access via assigned roles & privileges.

What is EasyAuth?

EasyAuth works by intercepting the authentication requests ( /. auth/* ) or when authenticated, fills in the user context within your application. That's the 5-second pitch. Now, the . NET Framework application lifecycle allowed tons of stuff to happen when you added an HttpModule in your application.

Which of the following type of authentication is supported in web app in Microsoft Azure?

Azure App Service provides built-in authentication and authorization capabilities (sometimes referred to as "Easy Auth"), so you can sign in users and access data by writing minimal or no code in your web app, RESTful API, and mobile back end, and also Azure Functions.


1 Answers

I'd recommend taking a look at Apache Shiro: http://shiro.apache.org/

It handles the security portion of your application and gives you a great deal of flexibility in how to secure things. For example, you can add an annotation to secure individual methods (for example: you can't run this method unless you are an admin), individual pages (for example: you can't load this page unless you are an admin), and URL patterns (you must be admin to access anything containing /admin/* in the url).

Give how complex it can be do to security right, Shiro is very simple to use. It may take just a bit to get your head around some of the concepts initially, but Shiro does a very good job of hiding as much of the complexity as possible. Also the user list is very responsive and extremely helpful.

If you use Tapestry, you might look at http://tynamo.org/tapestry-security+guide It makes it very easy to get Shiro up and running in a Tapestry application and gives you some easy to use tags to use in your templates.

Shiro isn't going to give you OpenID, OAuth or Facebook integration out of the box, but chances are high you will need to customize that part to your application. I believe there is some work being done to help integrate functions that will help enable these types of authentication into the framework.

Some of the frameworks that build on Shiro may offer more of what you are looking for. For example, http://tynamo.org/tynamo-federatedaccounts+guide will give you more support for federated logins in a tapestry application. It is still in the early stages, but might be working looking at if you are using Tapestry. Even if it doesn't do exactly what you need, it might provide some good examples to look at.

You also might be interested in: http://static.springsource.org/spring-security/site/

As a side note: In addition to security there are probably a bunch of other technologies that you will need in a typical web project. You may need security, persistence, basic user management, etc. If you create many web applications, it might be worth creating a maven archetype that lets you quickly get a new basic application up and running so you can start coding with all the initial structure already in place. AppFuse tries to do this, but it aims more at allowing you many different choices when it comes to web frameworks. If you know what technology you are going to use, having a startup app that is customized for your needs can be a huge timesaver.

like image 74
Mark Avatar answered Nov 12 '22 05:11

Mark