User Login Failure

User Login Failure

Old forum URL:

MadGerbil posted on Monday, March 05, 2012

It appears that the Csla Principal object returns an Unauthenticated Identity when the user logs out (which is good) but also returns an Unauthenticated Identity when the user attempts to log in with invalid credentials.  

Since both situations return the same Unauthenticated Identity it becomes a problem when I want to change the UI to reflect an invalid username/password combination.  What strategies do you use to differentiate between the two conditions?

Perhaps I should create a Invalid Identity object and return that?

MadGerbil replied on Monday, March 05, 2012

I ended up creating an InvalidIdentity object so that my DataPortal may return UnauthenticaedIdentity, AuthenticatedIdentity, or an InvalidIdentity objects.   The InvalidIdentity object is identical to the UnauthenticatedIdentity object but it returned under different circumstances.

If the InvalidIdentity is returned then my UI is updated accordingly.

Copyright (c) Marimer LLC