Searching for the right pattern to handle login data

Posted by stevebot on Stack Overflow See other posts from Stack Overflow or by stevebot
Published on 2010-05-12T16:49:44Z Indexed on 2010/05/12 16:54 UTC
Read the original article Hit count: 217

Hi all,

I'm working on a controller that handles logins for a Web app. These logins will come from multiple clients but will all contain the same data. However, depending on the client, this data will be interpreted into common entities for our webapp differently.

For instance, we have a user code that gets sent in, and in one case we may use the first four digits of the code, and in another case 12 digits of the code to map to a field on a User entity.

Instead of handling this all in the controller and having big nasty if blocks of logic, I would like to use a pattern to handle how this information gets ingested into our application.

What are your opinions?

© Stack Overflow or respective owner

Related posts about design-patterns

Related posts about login