草庐IT

mutual-authentication

全部标签

PHP ssh2_auth_pubkey_file() : Authentication failed using public key: Invalid key data, 不是 base64 编码

在PHP5.3.3中(在CentOS和apache2上)我试图通过php脚本连接到SFTP。代码从构造函数中获取key和服务器详细信息function__construct(){$this->host='servername.loc';$this->port=SFTP_PORT;$this->auth_user='username';$this->auth_pub='/data/home/username/.ssh/id_rsa.pub';$this->auth_priv='/data/home/username/.ssh/id_rsa';$this->auth_pass=null;$

php - 401 - 尝试使用 PHP 将图片上传到 TwitPic 时出现 "Could not authenticate you (header rejected by twitter)."

我正在使用meltingice'sAPIforTwitPic当我尝试上传图片时,出现401错误消息“无法对您进行身份验证(标题被Twitter拒绝)”。我的header(从HTTPRequest2对象中检索)是:Array([user-agent]=>HTTP_Request2/2.0.0(http://pear.php.net/package/http_request2)PHP/5.2.17[x-verify-credentials-authorization]=>OAuthrealm="http://api.twitter.com/",oauth_consumer_key="***

php - Twitter REST API – 使用 'Could not authenticate you' 参数时出现 'tweet_mode=extended' 错误

在从https://api.twitter.com/1.1/statuses/user_timeline.json检索数据时,我在使用TwitterRESTAPI和cURL时遇到了一个小问题。我在下面进行了以下设置,效果很好,但是一旦我尝试获取扩展推文(tweet_mode=extended)但将URL替换为https://api.twitter.com/1.1/statuses/user_timeline.json?tweet_mode=extended它出错并显示Couldnotauthenticationyou.如果我删除参数?tweet_mode=extended它再次工作正常

PHP/亚马逊 S3 : Query string authentication sometimes fails

我用PHP创建了一个简单的文件浏览器,它通过生成过期查询URL链接到文件。因此,对于目录的每次访问,都会生成一个指向每个文件的链接,该链接的有效期为900秒。我现在遇到的问题是生成的签名有时似乎会失败。这很奇怪,因为我有意使用外部S3库来生成URL和签名。事实上,我尝试了以下库来生成签名:CloudFusionS3generatorAmazonS3PHPclass库内部使用hash_hmac('sha256',...或hash_hmac('sha1',...-我也不明白为什么要使用不同的哈希算法。由于所有库都有相同的问题,所以它也可能出现在我的URL生成代码中,尽管这很简单:$buck

php - 拉维尔 5.3 : Passport Implementation - {"error" :"invalid_client" ,"message" :"Client authentication failed"}

我遵循了Laracast:What'sNewinLaravel5.3:LaravelPassport中提到的确切步骤使用oauth2实现api身份验证。我在客户端/消费者项目中的web.php文件如下所示:useIlluminate\Http\Request;Route::get('/',function(){$query=http_build_query(['client_id'=>2,'redirect_uri'=>'http://offline.xyz.com/callback','response_type'=>'code','scope'=>'',]);returnredir

php - 推特 API : Allow accept request to follow authenticated user

由于显示有年龄限制的内容,我有一个protectedTwitter帐户。有没有办法使用twitterAPI来接受或拒绝关注此帐户的请求。我知道我可以使用查看这些请求http://api.twitter.com/version/friendships/incoming.json但是哪个请求会接受一个请求。我在看http://api.twitter.com/version/friendships/create.json请求但这接缝是为了关注用户而不是接受让他们关注我的请求。 最佳答案 知道Twitter网络使用它自己的API来为其提供动

php - 推特 1.1 OAuth authenticity_token_error(99)

我使用以下代码获取不记名token:$token=base64_encode($client_id.':'.$client_sec);$data=array('grant_type'=>'client_credentials');$data=http_build_query($data);$header=array('Authorization:Basic'.$token,'Content-type:application/x-www-form-urlencoded;charset=UTF-8','Content-Length:'.strlen($data));$options=arr

php - 来自 CognitoIdentityProviderClient::adminCreateUser() 的 MissingAuthenticationTokenException ("Missing Authentication Token")

我有AWSPHPSDK的有效实现。$client->getUser()之类的操作有效,但$client->adminCreateUser()等操作无效。当我调用$client->adminCreateUser([...])时,结果是:Errorexecuting"AdminCreateUser"on"https://cognito-idp.ap-southeast-2.amazonaws.com";AWSHTTPerror:Clienterror:`POSThttps://cognito-idp.ap-southeast-2.amazonaws.com`resultedina`400B

Php adLDAP 错误 - 无法绑定(bind)到服务器 : Strong(er) authentication required

我正在尝试使用PHPadLDAPversion4.04在公司网络上进行身份验证但尚未成功。PHP版本5.2.4我尝试了这个stackoverflow帖子PHPldap-Strong(er)authenticationrequired,运气不好。我不是这个域Controller的管理员;我只需要能够查询即可。我可以pingHOSTNAMEOFDC.domain.location.company.com(我的域Controller的FQDN)域Controller是WindowsServer2012R2Standard。我已经使用DsQuery和PowerShellAD模块成功查询了这个域

php - Five9 的 API : How to pull reports using SOAP API and Basic Authentication

我们正在尝试使用那里的报告API从Five9的服务器访问数据。我们在下面编写了代码,但没有得到任何结果。在我看来,问题出在对Five9服务器的身份验证上。请检查以帮助我们了解我们如何定期提取特定事件的数据并将其存储在数据仓库中。$soapUser,'password'=>$soapPassword);$auth_details=base64_encode($soapUser.":".$soapPassword);$client=newSoapClient("https://api.five9.com/wsadmin/v2/AdminWebService?wsdl",$soap_opti