- All Implemented Interfaces:
- javax.ws.rs.container.ContainerRequestFilter
@Priority(value=1000)
public class AuthFilter
extends Object
implements javax.ws.rs.container.ContainerRequestFilter
This ContainerRequestFilter adds basic authentication support to the Grizzly + Jersey server.
Basic authentication is insecure by itself, but short of more complex solutions like oauth it is the best
option when coupled with transport-layer security (secure sockets).
It seems wasteful to encrypt all communication with the server, but TLS uses very efficient symmetric-key
encryption on the messages themselves. Only the TLS handshake uses compute-intensive public key encryption,
which establishes a shared key.
In Jersey 2 this filter should configure the SecurityContext which will be passed through to the web resources.