how to do authentication in REST web service using jersey framework and java?
I used NetBean IDE and create Rest web service, the application server is glassfish.
I don’t use javadb or derby. My database is mongodb.
I have google and i found http://weblogs.java.net/blog/mhadley/archive/2008/03/authentication.html.
But that site described he used derby database.
How should i configure in web.xml for authenticate?
how to do authentication in REST web service using jersey framework and java? I
Share
You can as well use
filerealm of glassfish to test if your code & basic authentication works.For that add your users into file realm and modify your configuration in web.xml:
Later you can switch to jdbc realm and add jdbc data source to use with mongodb and realm.