
Originally Posted by
rwinch
Spring Security
supports localization through Spring's LocaleContextHolder, but managing that Locale is outside of what Spring Security supports. If you want to manage the locale, use the MVC framework of your choice. If you are using Spring MVC, see the
using locales from the Spring MVC documentation.
Thanks, rwinch. I learned another powerful Spring feature.
However, maybe my example in the first post confused you. The name and value of the hidden input are not just "Language" and "English", it can be something like
HTML Code:
<input type="hidden" name="name_1" value="value_1">
<input type="hidden" name="name_2" value="value_2">
And there can be up to 5 of such inputs.
So i thought if I can use an object to store those hidden inputs, like
HTML Code:
public class MyHiddenObject{
private String value_1;
private String value_2;
.........
private String value_5;
//getter and setters
........
}
Then, I can read the hidden inputs at some stages, store them into MyHiddenObject. When the OpenID authentication is returned, I can read the values from MyHiddenObject.
The steps would be
1. User click Google image to authenticate using OpenID.
2. Store hidden form values into MyHiddenObject using setters.
3. Store MyHiddenObject into somewhere.
3. OpenID authentication.
4. Retrieve MyHiddenObject from somewhere.
5. Read MyHiddenObject fields using getters.
Any idea? Thanks