如何使用排球实现摘要身份验证? [英] how to implement digest authentication using volley?

查看:109
本文介绍了如何使用排球实现摘要身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助我使用Google Volley进行Web服务调用(REST)来实现摘要身份验证.

Any one can help me for implement digest authentication using Google Volley for web service calling (REST).

基本上Volley正在使用SHA1身份验证(基本身份验证),但是有什么方法可以使用摘要身份验证(MD5)进行修改.

basically Volley is using SHA1 authentication(Basic Auth), But is there any way to modify with digest Auth (MD5).

推荐答案

最适合您的解决方案是使用HttpDigestStack.您可以在这里找到文档: http://www.java2s .com/Open-Source/Android_Free_Code/Framework/platform/com_gm_android_volleyHttpDigestStack_java.htm

The best solution for you is, indeed, use the HttpDigestStack. You can find the docs right here: http://www.java2s.com/Open-Source/Android_Free_Code/Framework/platform/com_gm_android_volleyHttpDigestStack_java.htm

您要做的就是在使用Volley创建新的RequestQueue时,提供HttpDigestStack的新实例作为附加参数.您可以按照以下示例进行操作:

All you have to do is to provide a new instance of a HttpDigestStack as an additional parameter when creating a new RequestQueue using Volley. You can follow this example:

Volley.newRequestQueue(context, new HttpDigestStack());

这篇关于如何使用排球实现摘要身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆