对Drupal 7的REST服务器基本HTTP认证

编程入门 行业动态 更新时间:2024-10-28 14:28:44
本文介绍了对Drupal 7的REST服务器基本HTTP认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我喜欢这种感觉可能已经某处回答,但似乎没有人有直接回答这个问题,关于Drupal和我想知道如果可能使所有的差异。

I feel like this might be answered already somewhere, but no one seems to have answered this question directly about Drupal and I'm wondering if that might be making all the difference.

我已经建立了香草Drupal安装,只需使用REST服务器来处理推送通知必要的模块。在与CocoaRestClient测试REST服务器(在这里找到的http:// code.google / p /可可其余的客户端/ )我遇到与基本HTTP认证问题(验证失败)。我曾与会话验证测试和完美的作品。我的用户名和密码是最肯定是正确的。该服务基本身份验证模块并没有提供太多的设置的方式,所以我能怎么做错了?

I have setup a vanilla Drupal installation with just the necessary modules to use a REST server to handle Push Notifications. In testing the REST server with the CocoaRestClient (found here code.google/p/cocoa-rest-client/) I am encountering a problem with Basic HTTP Authentication (Authentication is failing). I have tested with Session Authentication and that works perfectly. My username and password are most certainly correct. The Services basic authentication module doesn't provide much in the way of setup, so what could I be doing wrong?

Modules being used: Push Notifications Services Services basic authentication REST Server

7.22 Drupal的最小(香草安装 - 没有主题或高于列出的其他任何花哨的模块)。

Drupal 7.22 minimal (vanilla install - no themes or any other fancy modules than the ones listed).

推荐答案

基本身份验证,您可以GET,POST,PUT和DELETE,以使用基本认证头端点。我不知道这是否会做的/登录结束点什么。授权头应基本遵循由基于-64连接的codeD字符串了'用户名:密码(不包括引号)。授权:基本QWxhZGRpbjpvcGVuIHNlc2FtZQ ==

Basic auth enables you to GET, POST, PUT, and DELETE, to your endpoints using a Basic Auth Header. I am not sure if it will do anything for the /login end point. The authorization header should be made up of Basic followed by a based-64 encoded string of 'user:password' (not including the quotes). Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

您可以使用这个邮差或提琴手快速测试。

You can quickly test this using Postman or Fiddler.

更多推荐

对Drupal 7的REST服务器基本HTTP认证

本文发布于:2023-11-25 07:20:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1628839.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:服务器   Drupal   REST   HTTP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!