Using form-login for authentication. I need to be able to configure the failure-url and success-url from a database table we have for configuring other aspects of the application.
My application which this authenticates users for is linked to from a different application which may be on this server or another server and I need to fail back there or go there when the user logs out.
<form-login authentication-success-handler-ref="authenticationSuccessHandler"
always-use-default-target="true"
authentication-failure-url="**/failureurl.aspx**"
default-target-url="/home/configuration"/>
<logout logout-success-url="**/successurl.aspx**" invalidate-session="true"/>
How would I change these attributes on the fly?
Sounds like you have logic processing that determines where the user actually lands. If I were you, I’d wire your attributes to be intercepted by another controller that processes the request based on your rules and the redirect from there.
And then: