Authentication in a client application for REST se

2019-08-27 15:48发布

Firstly, I'm going to explain my objective: I developed some REST services using Jersey, that were automatically generated from my MySQL DataBase. In that DataBase I have a Login table, that have the information of who can access the REST services. With this Login table I've allready implemented Basic-Authentication for my Jersey REST services, and that's working. When I go to the REST services mainpage, I have to put the correct login and password, and then I can access all information of all services.

Now, I'm implementing Authentication for a Client application that can consume those services. I'm thinking of use HttpBasicAuthFilter or HttpURLConnection, but I want to know if I need to implement Authentication in all Java classes. The objective is to have for example a mobile application, that just ask for the login and the password in the beggining, and not in every steps, just like I did with Basic-Authentication.

Thanks

0条回答
登录 后发表回答