Announcement Announcement Module
Collapse
No announcement yet.
Trouble implementing the sign in Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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.

      Comment


      • #4
        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?

        Comment


        • #5
          Ok, I've just create this at https://jira.springsource.org/browse/SOCIAL-187

          Comment

          Working...
          X