Thanks for the reply karldmoore!
I tried what you suggested, passing a value with the username but for some reason, in my CustomApplicationProcessingFilter I can't retrieve the value?
Perhaps its something stupid I'm overlooking..
Here is the markup in my signin form:
HTML Code:
<form action="/studentapp/student/j_acegi_security_check" method="POST">
<table>
<tr><td>User:</td><td><input type='text' name='j_username' value='null:MY_OUTLET:aodh'></td></tr>
<tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
<tr><td><input type="checkbox" name="_acegi_security_remember_me"></td><td>Don't ask for my password for two weeks</td></tr>
[B]<input type="hidden" name="outlet_id" value="MY_OUTLET">[/B]
<tr><td colspan='2'><input name="submit" type="submit"></td></tr>
<tr><td colspan='2'><input name="reset" type="reset"></td></tr>
</table>
</form>
With the hidden field sending a test value in bold.
It comes up as null in the processing filter?
The key i'm using to retrieve the value from the request is:
Code:
private static final String OUTLET_ID = "outlet_id";
I override the obtainUsername() method in the processing filter to do this and it is hitting the method as I get the System.out() outputs...
Code:
protected String obtainUsername(HttpServletRequest request) {
String outlet_id=(String) request.getAttribute(OUTLET_ID);
String username=(String)request.getParameter(ACEGI_SECURITY_FORM_USERNAME_KEY);
System.out.println("OUTLET ID:" + outlet_id);
System.out.println("Username:" + username);
return outlet_id + ":" + username;
}
Any idea why my hidden value isn't making it through to the filter?