草庐IT

Authenticate

全部标签

python - Django Tastypie : How to Authenticate with API Key

我正在使用TastyPie制作一个内部API。我有fromtastypie.authenticationimportApiKeyAuthenticationclassMyResource(ModelResource):Meta:authentication=ApiKeyAuthentication()在禁用身份验证规则的情况下,我的API运行良好。启用它后,无论我尝试什么,我都会收到401(未经授权)响应。我敢肯定,一旦您看到它的实际效果,这是非常明显的事情之一,但与此同时,请告知如何发出请求(GET)。 最佳答案 将用户名和api

ios - 轨道 API : Authenticate users from native mobile apps using username/password or facebook token

因此,我已经绞尽脑汁好几天了,试图弄清楚如何将用户名/密码身份验证添加到我的Rails移动API。以下是我当前身份验证流程的简要概述:用户在移动客户端上选择“使用Facebook登录”,客户端重定向到Facebook应用程序并请求access_token成功后,Facebook使用访问token和客户端进行响应重定向回我的应用。客户端将访问token发送到我的API我的API使用koalagem检查访问token是否有效。如果token有效,Facebook会将用户数据发送到API创建新用户的地方。如果用户已经存在,我的API会向下发送用户数据。我的API在步骤4中处理访问token,

ios - AWS : How to properly authenticate a user against Cognito Pool and use it for Cognito Federated Identity?

我正在开发一个将使用两个身份验证提供程序的应用程序:FacebookCognito用户群对于前者,我没有任何问题,一切都按预期进行。但是,在使用Cognito用户池设置身份验证时,我遇到了一个接一个的问题。我正在使用AWSSDK2.4.9、XCode8和Swift3。我知道已经提出了很多问题,并且有很多“指南”。然而,其中很多是针对过时的文档和SDK回答/制作的。甚至官方AWS文档也已过时。我正在执行的身份验证步骤如下:1。配置初始认知池///SetthedefaultserviceconfigurationletserviceConfiguration=AWSServiceConfi

PHP Swift 邮件程序 : Failed to authenticate on SMTP using 2 possible authenticators

当我使用PHPSwift邮件程序向此服务器发送电子邮件时:smtp.exchange.example.com,如下所示://Loadtransport$this->transport=Swift_SmtpTransport::newInstance(self::$config->hostname,self::$config->port)->setUsername(self::$config->username)->setPassword(self::$config->password);//Loadmailer$this->mailer=Swift_Mailer::newInstanc

php - PHPMailer中的"SMTP Error: Could not authenticate"

我在通过Gmail发送电子邮件的简单脚本中使用PHPMailer,我收到“未知错误”(至少对我而言!):SMTPError:Couldnotauthenticate.Error:SMTPError:Couldnotauthenticate.SMTPservererror:5.7.1UsernameandPasswordnotaccepted.Learnmoreat5355.7.1http://mail.google.com/support/bin/answer.py?answer=14257p38sm2467302ybk.16我读过有关为SSL/TLS连接配置OpenSSL的内容,并且

node.js - 如何将附加参数传递给 passport.authenticate

(我已经做了fbStrategy.passReqToCallback=true)我在胡说八道https://scotch.io/tutorials/easy-node-authentication-linking-all-accounts-together但想将此社交身份验证服务用于多个应用程序,例如:控制供暖系统的应用程序、打开洒水器的应用程序等。基本上,如果这些应用程序之一与服务器进行检查并且没有正确的token,它会被重定向到此社交身份验证服务(social-auth)。当用户按下社交登录按钮时,它会获取来自哪个应用程序的参数并将其添加为/auth/facebook/:appid

ruby - RFC2616 : Do I really need to set WWW_Authenticate when returning 401?

根据RFC2616如果我返回401以响应对我的(Ruby)服务器的请求,我“必须包含一个WWW-Authenticateheader字段”。这是真的吗?不设置标题似乎没有负面影响。我将Merb用作Web框架,它不会强制我设置header。我是不是遗漏了什么,或者这条规则在违反时更受尊重?Web框架是否应强制开发人员在返回401时设置header? 最佳答案 问题是您是否希望用户能够从401失败导航到以后的成功身份验证。如果您未能提供WWW-Authenticateheader,那么您正在将401的含义从“您必须提供凭据”更改为“我们

ruby-on-rails - 未找到 authenticate_with_http_token 方法

我正在用ruby​​onrails制作一个api,我正在尝试使用基于token的身份验证。一切正常,但Rails说authenticate_with_http_token方法未定义。这是它给出的错误:{"status":500,"error":"InternalServerError","exception":"#\u003cNoMethodError:undefinedmethod`authenticate_with_http_token'for#\u003cUsersController:0x007fa8ac16dee0\u003e\u003e","traces":{"Applic

ruby - Rails - 未定义的方法 `authenticate'

我在尝试对用户进行身份验证时收到以下错误。NoMethodError(undefinedmethod验证'#)`当我从Rails控制台执行命令时,user.authenticate('password')成功(即返回用户对象)。irb(main):008:0>user.authenticate("sanket")=>#但是,当我将user.authenticate放入辅助类中并使用url访问它时,它会显示undefinedmethod'authenticate'for#我正在关注RailsTutorial我的用户模型是这样的:classUsersession_helper.rb中的相关

ruby-on-rails - 在 RSpec 测试中跳过 Rails http_basic_authenticate_with

我正在研究MVP(最小可行产品)。为了提供一种更简单的方法来保护管理页面,我只是将http_basic_authenticate_with添加到我的AdminController。问题是当我想测试我的AdminController时,我得到“未授权”(401),因为我没有登录。在这种情况下,测试身份验证是无关紧要的——它只是暂时的,一旦我进入下一个冲刺,它就会被删除——所以我试图在RSpec中跳过它。问题是我尝试了很多方法,但似乎都没有用。例如,我试图修改http_basic_authenticate_with以避免身份验证。像这样:require'spec_helper'module