如何正确验证用户的凭据 [英] How to properly authenticate my user's credentials

查看:60
本文介绍了如何正确验证用户的凭据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://developers.credly.com/getting-started



我正在尝试做熟悉身份验证所述的内容



我在尝试下面的代码后仍然收到401错误。我所想要的就是让它发挥作用。我的用户名和密码工作正常,我阅读了本网站上为授权字段说明的所有内容。请帮助



https://en.wikipedia.org/wiki/Basic_access_authentication#Protocol



< b>我尝试过:



https://developers.credly.com/getting-started

I'm trying to do what is being stated on "Get familiar with authentication"

I'm still getting a 401 error after trying my code below. All I ever wanted is to make it work. My username and password is working properly and I read the everything stated on this site for Authorization field. Please help

https://en.wikipedia.org/wiki/Basic_access_authentication#Protocol

What I have tried:

string encoded = Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(email_address + ":" + password));

                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(end_Point);
                    request.Headers.Add("X-Api-Key", credly_api_key);
                    request.Headers.Add("X-Api-Secret", credly_app_key);
                    request.Headers.Add("Authorization", "Basic " + encoded);

推荐答案

401 表示未经授权的访问。换句话说,您正在尝试访问需要身份验证的资源,但您提供的凭据无效。请确认您使用的是正确的电子邮件和密码,并确认它们是有效的并且已注册。



此外,这里可能有一些人知道信任整合,但我在与支持团队联系时,我们认为您有更好的机会获得问题的答案。 Credly的客户反馈 [ ^ ]
401 indicates unauthorized access. In other words, you are trying to access a resource that requires authentication but the credentials you supplied was invalid. Please verify that you are using the correct email and password, and verify they were valid and registered.

Also, there maybe some here who knows about credly integration, but I think you get a better chance of getting answers to your issue when contacting their support team. Customer Feedback for Credly[^]


服务器是IIS吗?



匿名身份验证是否已关闭? (即使打开其他形式的auth,如果Anonymous也在那里,它也会尝试。)



(我既没有VS,也没有Web服务器在这里测试我是否知道我在说什么。但我在过去遇到过类似的问题。)
Is the server IIS?

Is Anonymous authentication turned OFF? (Even if the other forms of auth are turned on, if Anonymous is also there, it will try that.)

(I have neither VS, nor a web server here to test if I know what I'm talking about. But I'be run into similar problems in the past.)


这篇关于如何正确验证用户的凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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