{"action":"created","issue":{"url":"https://api.github.com/repos/mkopylec/charon-spring-boot-starter/issues/56","repository_url":"https://api.github.com/repos/mkopylec/charon-spring-boot-starter","labels_url":"https://api.github.com/repos/mkopylec/charon-spring-boot-starter/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/mkopylec/charon-spring-boot-starter/issues/56/comments","events_url":"https://api.github.com/repos/mkopylec/charon-spring-boot-starter/issues/56/events","html_url":"https://github.com/mkopylec/charon-spring-boot-starter/issues/56","id":321726015,"number":56,"title":"`ForwardedRequestInterceptor` question","user":{"login":"michaelmccaskill","id":976479,"avatar_url":"https://avatars1.githubusercontent.com/u/976479?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelmccaskill","html_url":"https://github.com/michaelmccaskill","followers_url":"https://api.github.com/users/michaelmccaskill/followers","following_url":"https://api.github.com/users/michaelmccaskill/following{/other_user}","gists_url":"https://api.github.com/users/michaelmccaskill/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelmccaskill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelmccaskill/subscriptions","organizations_url":"https://api.github.com/users/michaelmccaskill/orgs","repos_url":"https://api.github.com/users/michaelmccaskill/repos","events_url":"https://api.github.com/users/michaelmccaskill/events{/privacy}","received_events_url":"https://api.github.com/users/michaelmccaskill/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-09T21:03:40Z","updated_at":"2018-05-09T21:08:21Z","closed_at":"2018-05-09T21:08:21Z","author_association":"NONE","body":"I'm looking at using this starter but I need to be able to enforce a valid Bearer token is in the `Authorization` header. If so I can call a custom service to validate the token. If it's not valid I want to stop the forward from happening. I realize I could simply write another filter and have it execute prior to the `ReverseProxyFilter` but the problem is I need to set certain headers with values that come from the result of the validation call. What's the best approach here? If I use a separate filter I end up calling the same service twice.\r\n\r\n`AuthenticationFilter` -> `AuthenticationService.validateToken`\r\n`ReverseProxyFilter` -> `AuthenticationService.validateToken`\r\n\r\nBut if I throw an exception inside of `ForwardedRequestInterceptor` that has `@ResponseStatus(HttpStatus.UNAUTHORIZED)` then the `TraceFilter` bombs and I get a 500 back.\r\n\r\n`o.s.c.sleuth.instrument.web.TraceFilter  : Uncaught exception thrown`"},"comment":{"url":"https://api.github.com/repos/mkopylec/charon-spring-boot-starter/issues/comments/387876248","html_url":"https://github.com/mkopylec/charon-spring-boot-starter/issues/56#issuecomment-387876248","issue_url":"https://api.github.com/repos/mkopylec/charon-spring-boot-starter/issues/56","id":387876248,"user":{"login":"michaelmccaskill","id":976479,"avatar_url":"https://avatars1.githubusercontent.com/u/976479?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelmccaskill","html_url":"https://github.com/michaelmccaskill","followers_url":"https://api.github.com/users/michaelmccaskill/followers","following_url":"https://api.github.com/users/michaelmccaskill/following{/other_user}","gists_url":"https://api.github.com/users/michaelmccaskill/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelmccaskill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelmccaskill/subscriptions","organizations_url":"https://api.github.com/users/michaelmccaskill/orgs","repos_url":"https://api.github.com/users/michaelmccaskill/repos","events_url":"https://api.github.com/users/michaelmccaskill/events{/privacy}","received_events_url":"https://api.github.com/users/michaelmccaskill/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T21:08:21Z","updated_at":"2018-05-09T21:08:21Z","author_association":"NONE","body":"Closing because you don't use `TraceFilter`. Looks like it's something else that's pulling this in. This isn't a valid issue."}}
{"actor":{"display_login":"michaelmccaskill"}}