java 如何使用resteasy开发身份验证?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1807781/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 18:04:24  来源:igfitidea点击:

How to develop authentication with resteasy?

javaauthenticationrestweb-servicesresteasy

提问by newbie

I'm making small web service(1) and I decided to use resteasy to make it. But I need to know what would be best practise to develop authentication with resteasy. And what kind of responses webservice should send? Are responses usually in XML or what format, and what format of XML response should be?

我正在制作小型网络服务(1),我决定使用 resteasy 来制作它。但是我需要知道使用resteasy开发身份验证的最佳实践是什么。网络服务应该发送什么样的响应?响应通常是 XML 还是什么格式,XML 响应应该是什么格式?

Btw. I use jboss 4 and Java 5.

顺便提一句。我使用 jboss 4 和 Java 5。

http://www.assertionerror.com/2009/02/26/restful-web-services-with-resteasy/

http://www.assertionerror.com/2009/02/26/restful-web-services-with-resteasy/

(1) What technology I should use to develop small Java webservice?

(1)我应该使用什么技术来开发小型Java webservice?

采纳答案by miku

回答by Tommaso

For the authentication you can use the Interceptor (classes that are invoked before the RESTEasy annotated class), see

对于身份验证,您可以使用拦截器(在 RESTEasy 注释类之前调用​​的类),请参阅

I'm developing a big application, and I'm using Interceptors for the authentication

我正在开发一个大型应用程序,我正在使用拦截器进行身份验证