简体   繁体   English

TYPO3-使用tx_sv_authbase对be_users进行外部认证

[英]TYPO3 - external authentication of be_users with tx_sv_authbase

I am using TYPO3 4.5 and have to authenticate fe_users and be_users from an external source. 我正在使用TYPO3 4.5,并且必须从外部来源验证fe_users和be_users。

In my extension I have subclassed tx_sv_authbase and implemented the getUser() and authUser() functions. 在我的扩展程序中,我将tx_sv_authbase子类化,并实现了getUser()和authUser()函数。

For fe_users everything works fine! 对于fe_users,一切正常! Depending on what I return in authUser() the login happens or not. 根据我在authUser()中返回的内容,是否进行登录。

But I can't get it to work for be_users. 但是我无法使其适用于be_users。 Shouldn't it work exactly the same? 它不应该完全一样吗? No matter if I return 200 or true, I can't login with my extension. 无论我返回200还是true,我都无法使用自己的扩展名登录。 What could be the reason for this? 这可能是什么原因? Any hints? 有什么提示吗?

Yes, it should be exactly the same for be_users as for fe_users. 是的,对于be_users和fe_users应该完全相同。

Please check ext_localconf.php, if both authUserFE and authUserBE are used as subtypes (seperated by comma). 如果authUserFEauthUserBE都用作子类型(用逗号分隔),请检查ext_localconf.php。

I have created an Yubikey OTP auth service for TYPO3, which authenticates local TYPO3 users with an Yubikey OTP. 我为TYPO3创建了Yubikey OTP身份验证服务 ,该服务使用Yubikey OTP对本地TYPO3用户进行身份验证。 My extension does not use getUser(), but authentication works both for fe_users and be_users. 我的扩展程序不使用getUser(),但身份验证对fe_users和be_users均有效。 Maybe this helps you debugging and fixing your problem. 也许这可以帮助您调试和解决问题。

I got it to work now! 我现在开始工作了! Also the RSA encryption system which is default in TYPO3 6.2 is awesome! TYPO3 6.2中默认的RSA加密系统也很棒! :) :)

The problem was in my getUser() function. 问题出在我的getUser()函数中。 There you have to map to existing users (if your user names from the external source aren't also contained in the TYPO3 database) and I forgot that my backend user name is different to my frontend user name. 在那里,您必须映射到现有用户(如果TYPO3数据库中也没有包含来自外部来源的用户名),而我忘记了后端用户名与前端用户名不同。

The other confusing thing was that for some changes to take effect you always have to delete the cache files in typo3conf. 另一个令人困惑的事情是,要使某些更改生效,您总是必须删除typo3conf中的缓存文件。 This costed me some time. 这花了我一些时间。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM