Announcement Announcement Module
Collapse
No announcement yet.
WhitlabelApprovalEndpoint only adds the context path to the model. Is this right? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • WhitlabelApprovalEndpoint only adds the context path to the model. Is this right?

    I'm not sure about how everything works yet, so thank you for bearing with me.

    I have my dispatcher servlet deployed in a non-root location. So in web.xml the servlet mapping is '/oauth2.0/*'. This was an existing convention.

    Using defaults wherever possible, the authorization page displays just fine, but WhitelabelApprovalEndpoint that's mapped to /oauth/confirm_access has a target that does not include the context path from the servlet request (in my case, /oauth2.0/oauth/confirm_access).

    Long story short, when I replace change line 77 of WhitlableApprovalEndpoint.java from:

    Code:
    map.put("path", (Object) request.getContextPath());
    to:

    Code:
    map.put("path", (Object) request.getContextPath() + request.getServletPath());
    ... it redirects properly. I don't know if this is a problem in the way I have my application configured, or if it is something that I need to create a bug report for in spring-security-oauth.

    Thank you for your consideration.

    *EDIT: For your convenience: https://github.com/SpringSource/spri...lEndpoint.java
    Last edited by joem86; Apr 12th, 2013, 11:36 AM. Reason: Added github reference to file

  • #2
    That seems reasonable - the samples and all tests assume the servlet is at /. A pull request would be fine (see contributor's guidlines in README), but I'm quite happy to make the change myself if you don't want the credit.

    Comment

    Working...
    X