I do not understand why SecurityServices interface is not applicable for this. You can write the filter and then make the Principal captured in a ThreadLocal available to Weld by implementing SecurityServices (the implementation would return the current value of the ThreadLocal).
|