You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by "James Bognar (Jira)" <ji...@apache.org> on 2020/01/02 18:58:00 UTC
[jira] [Updated] (JUNEAU-171) BasicRest class doesn't work
correctly with Spring Security.
[ https://issues.apache.org/jira/browse/JUNEAU-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Bognar updated JUNEAU-171:
--------------------------------
Description:
The Spring Security filters automatically set the URL of requests to "/error" with a status code of 401. When BasicRest gets the response, it tries to match this path and changes the status to 404 which messes up client-side responses.
The solution is to add a no-op error method to the BasicRest and BasicRestConfig classes:
{code:java}
@RestMethod(name="*", path="/error")
public void error() {}{code}
> BasicRest class doesn't work correctly with Spring Security.
> ------------------------------------------------------------
>
> Key: JUNEAU-171
> URL: https://issues.apache.org/jira/browse/JUNEAU-171
> Project: Juneau
> Issue Type: Bug
> Components: Code
> Affects Versions: 8.1.2
> Reporter: James Bognar
> Assignee: James Bognar
> Priority: Major
>
> The Spring Security filters automatically set the URL of requests to "/error" with a status code of 401. When BasicRest gets the response, it tries to match this path and changes the status to 404 which messes up client-side responses.
> The solution is to add a no-op error method to the BasicRest and BasicRestConfig classes:
> {code:java}
> @RestMethod(name="*", path="/error")
> public void error() {}{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)