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?
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