gastaldi/agorava-picketlink — pull request #1 by antoinesd (2013-07-16 17:21:07+00:00)
Title: Lazy CDI Injection fix the issue

So the bug came from the fact your filer was called before CaptureFilter in Agorava.
As your filter injected the service directly, all the underlying beqns where created and OAuthAppSettings was initialized with a bad Callback url
There were 3 solutions to this bug

1. The one I implemented by putting the injection in lazy mode and resolving only when needed
2. Split your filter in 2 parts : filter + servlet on /oauth_callback path to separate the concerns
3. having another bean that do the job in your filter and trigger this job thru a CDI event