Announcement Announcement Module
Collapse
No announcement yet.
Https problem in MVC controller Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Https problem in MVC controller

    Hi everyone,
    i have an application under Tomcat 6 composed by restful webservices implemented with spring MVC controller (spring 3.0.6, hibernate 3, java 6).
    There is a centralized controller that manage authentication process and use @ModelAttribute annotation on its checkAuthenticationParams method:
    Code:
    @Controller
    public class CheckAppController{
    	...
    	...	
            @ModelAttribute
    	public void checkAuthenticationParams(
    			@RequestHeader("token") String appToken,
    			@RequestParam(value="redirectUri", required=false) String redirectUri,
    			@RequestHeader(value="clientId") String clientId
    			
    			) throws AuthenticationException, Exception {
                              ...
                              ...
                            }
    Many others controller extends this one (to use authentication method after own entrypoint):

    Code:
    @Controller
    public class LoginController extends CheckAppController{
    
            @RequestMapping(method = RequestMethod.GET)
    	@ResponseBody
    	public ResultMap loginGetHandler(
    			@RequestHeader("clientId") String clientId,
    			@RequestParam("email") String email,
    			@RequestParam("password") String password,
    			@RequestParam("deviceId") Integer deviceId,
    			@RequestParam(value = "userType", required = false) String userType,
    			HttpServletRequest req) throws IllegalStateException, AuthenticationException{
                            ...
                            ...
                            ...
    
                            }
    }
    When i do a normal http call on login controller, application call first checkAuthenticationParams method and after loginGetHandler method, but when i do an https call on login controller the flow of the program stop on CheckAppController and not arrive on login controller (i reach this conclusion after test on different machine and different tomcat instance, all whit ssl configured).
    Any ideas?
    Thanks!!!!
Working...
X