开发者

How to write authentication method in REST web service?

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜