I am implementing RESTful web services using NetBeans (JAX-RS) and Glassfish server to expose database resources.
I want to implement varying levels of security depending upon the users requirement (maybe choice provided to user). From various discussions regarding REST security, I understand there are different ways (given below) in which security can be implemented. How can I implement a security solution as a service which will be invoked depending upon the context.
TLS (HTTPS) + 1. HTTP Basic 2. HTTP Digest 3. two-legged OAuth 4. a Cookie-based approach 5. client certificates 6. Signed requests using HMAC and a limited lifetime
Thanks in advance