Today I\'ve added a extra security check behind my login forms, to slow down brute force attacks. I\'ve got multiple login forms and made a nice easy to call function that d
Not sure about "best practice" but a pragmatic option is to return a Map? E.g.
myMap.put("result", "success");
myMap.put("usernameConfirmed", "bigTom");
return myMap;
Probably flies in the face of a million OO principles but I hear you re wanting to avoid a proliferation of result classes.
You could alternatively use Map and be stricter with type checks on stored objects: Strings, Booleans, Dates, etc.