Drupal External Authentication

守給你的承諾、 提交于 2019-12-24 16:31:05

问题


I have a cURL PHP script which is able to validate a username/password against the external source.

What is the best way to integrate this as a login requirement for (select) users in Drupal?


回答1:


To start with, you could look at the code of the OpenID module that comes with Drupal 6 - creating a new module based on this code should get you 90% of the way. It allows existing users to associate OpenIDs with their accounts, and it sounds like you'd need to do something similar from your reply to Henrik.




回答2:


As alternative, you can add a validation function to the form with ID user_login to verify if the additional conditions are verified. If you do this, remember to add your validation function with array_unshift(), or the user will be authenticated the same.



来源:https://stackoverflow.com/questions/1885199/drupal-external-authentication

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!