Results 1 to 5 of 5

Thread: Trouble implementing the sign in

  1. #1

    Default Trouble implementing the sign in

    Hi all,
    I'm having trouble implementing the sign in with the service provider accounts, in my case it's Twitter account. The problems occurred after submitting from the Twitter sign in form. The callback url is:
    Code:
    http://localhost:8080/myapp/signin/twitter?oauth_token=XYZ&oauth_verifier=XYZ
    It resulted to the 404 code, I'm using twitter account that are already having connection between my application and twitter.

    here are my form that got me to twitter sign in form
    Code:
    <form id="tw_signin" action="<c:url value='/app/signin/twitter'/>" method="POST">
      <input type="submit" value="Use Twitter" />
    </form>
    Im using spring-security-3.1.0.RC2 and in my security config file:
    Code:
    <http auto-config="true" access-denied-page="/login.jsp">
      <intercept-url pattern="/app/signin/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
      <intercept-url pattern="/index**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
      <intercept-url pattern="/login**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
      <intercept-url pattern="/app/signup**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
      <intercept-url pattern="/app/public/**" access="IS_AUTHENTICATED_ANONYMOUSLY, ROLE_USER" />
      <intercept-url pattern="/admin/**" access="ROLE_ADMIN" />
      <intercept-url pattern="/**" access="ROLE_USER" />	
    ...
    And here are my view resolver:
    Code:
    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
      <property name="requestContextAttribute" value="rc"/>
      <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
      <property name="prefix"    value="/WEB-INF/pages/"/>
      <property name="suffix"    value=".jsp"/>
    </bean>
    Thanks,

    Dikie Aditya

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Hmmm... is that callback URL correct? Looks like an /app/ element may be missing from the path. I'm assuming your servlet is mapped to /app/* instead of /, like our samples are.
    Keith Donald
    Core Spring Development Team

  3. #3

    Default

    Hi Keith, Thanks for the reply.
    Yes my DispatcherServlet is mapped to /app/* and by following your suggestion, I'm now able to fix the problem by adding the /app into my application.url.
    Code:
    application.url=http://localhost:8080/myapp/app
    Is it okay to change it like that.

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Well, we should probably be appending the servlet path there for you. I might consider that a bug. Would you mind opening a JIRA reporting this at jira.springsource.org?
    Keith Donald
    Core Spring Development Team

  5. #5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •