Easy way for Authentication and Authorization with JAX-RS Jersey

14,530

There are multiple ways to achieve that, let me point few of them:

  1. HTTP Basic authentication (BA) implementation is the simplest technique for enforcing access controls to web resources because it doesn't require cookies, session identifier and login pages. Rather, HTTP Basic authentication uses static, standard HTTP headers which means that no handshakes have to be done in anticipation.

  2. Role based access control for J2EE applications using realm

  3. OAuth with REST:

Share:
14,530

Related videos on Youtube

jvataman
Author by

jvataman

Updated on September 19, 2022

Comments

  • jvataman
    jvataman over 1 year

    I'm pretty new to REST and am currently developing an API with JAX-RS Jersey. I am curious on what is the easiest way to implement a user Management. I.e. users must log in and have restricted access to different resources depending on their role. From what I understand, using OAuth 2.0 is the current standard. Can I implement that with Jersey? Does anyone have a few links for me to get me started (examples, tutorials)? Or would you suggest another approach?

    Thanks a lot

  • jvataman
    jvataman over 10 years
    Thank you for the lightning-fast response! Which method would you suggest for a system handling very sensitive data? Are there any libraries or examples for OAuth with Jersey you would know of?
  • Juned Ahsan
    Juned Ahsan over 10 years
    @user2633221 Use Basic authentication with HTTPs. Try it, once you do so you will learn more about authentication and authorization. If at some point you feel it is not sufficient for your solution then move to others.
  • Asaf
    Asaf over 9 years
    2nd link is broken :(