Announcement Announcement Module
No announcement yet.
Login From Other Site form Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Login From Other Site form

    Hi, Iīm new on Spring. I made a webapp with java/tomcat/spring to a client. Now, the client wants to put a form on his webpage, to login to my app. But the app itīs located on my server, and his webpage itīs on his server. I tried a Ajax request based on url of acgei security.

    function AjaxPost()
    var xmlhttp = objectXML(); //Creates XML Request Object
    var data = "j_username=login&j_password=pass&acegiAjaxLogin=t rue";"POST", "", true);
    xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); // Setando Content-type
    xmlhttp.setRequestHeader("Content-length", dados_a_enviar.length); // Comprimento do conteúdo=comprimento dos dados a enviar

    I set my spring-security.xml authentication processing filter to

    <property name="filterProcessesUrl">
    <property name="authenticationFailureUrl">
    <property name="defaultTargetUrl">
    <property name="authenticationManager">
    <ref bean="authenticationManager"/>

    The Post is made correctly (Receives 200 response). Tomcat creates a session after the post, but my ajax request is empty.
    I know that I have to do something to receives the session created, but how can I do that ?
    How can I do a login from a external site ?

    Renato Ferreira