Do 开发者_开发知识库anyone know how shall I write the user authentication method in REST web service? I have write the authenticate class in servlet, can I reuse or how can I call in web service? I am very new to REST web serivce.
thanks
It really depends on the framework you're using, but at the abstract level the client has to present a token in the request that identifies who they are. That's typically done in the HTTP headers via an authentication header (basic auth or digest auth) or a cookie set by some kind of login mechanism, or through the SSL context on the HTTPS connection (for client-authenticated SSL).
精彩评论