Alternative authentication sources in CakePHP (LDAP)

后端 未结 3 816
孤城傲影
孤城傲影 2021-02-04 18:30

I\'m working on a CakePHP project and am currently building the user authentication part of it. The problem is that my authentication information (ie: the passwords) are not sto

3条回答
  •  长发绾君心
    2021-02-04 18:53

    Auth::authorize is indeed not a replacement for the model data, it just adds to it.

    5.2.6.10 authorize

    Normally, the AuthComponent will attempt to verify that the login credentials you've entered are accurate by comparing them to what's been stored in your user model. However, there are times where you might want to do some additional work in determining proper credentials.

    That shouldn't be a problem though, since the LDAP details should be abstracted away in the model. Cake will still check the model for username and password, but it is getting its answers transparently from an LDAP directory. You just need to implement an LDAP datasource for the model. Maybe these two articles can get you started.

提交回复
热议问题