[
https://issues.apache.org/jira/browse/CXF-4615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491717#comment-13491717
]
Steven Tippetts commented on CXF-4615:
--------------------------------------
It does work when I modify the filter as suggested. That said, I do have a
filter in the chain that does the following:
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
((HttpServletResponse)response).addHeader("Access-Control-Allow-Origin",
"*");
((HttpServletResponse)response).addHeader("Access-Control-Allow-Methods",
"PUT,POST,GET,OPTIONS");
((HttpServletResponse)response).addHeader("Access-Control-Allow-Headers",
"Content-Type, Authorization");
chain.doFilter(request,response);
}
It is now occurring to me that this may be similar to what the CORS filter is
doing. If so, then I just need to switch to it.
> OAuthRequestFilter.java should ignore HTTP OPTIONS verb
> -------------------------------------------------------
>
> Key: CXF-4615
> URL: https://issues.apache.org/jira/browse/CXF-4615
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS Security
> Affects Versions: 2.6.2, 2.7.0
> Reporter: Steven Tippetts
> Priority: Critical
>
> In handleRequest of OAuthRequestFilter.java at line 54 something similar to
> the following should be added:
> if (((String)m.get(Message.HTTP_REQUEST_METHOD)).equals("OPTIONS")) return
> null;
> This will skip any HTTP OPTIONS verb requests. I'm getting the OPTIONS verb
> request when using an OAuth 2 javascript client.
> I haven't found a way in the configuration to specify that OPTIONS requests
> should skip this filter.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira