开发者

How can I create a hybrid strategy in Devise that is valid only when one of its "parent" strategies are valid?

开发者 https://www.devze.com 2023-04-11 12:31 出处:网络
I\'m working on a hybrid strategy between ldap_authenticatable (link) and database_authenticatable (link).

I'm working on a hybrid strategy between ldap_authenticatable (link) and database_authenticatable (link).

I have it all working with the exception of the Devise::Strategies::LdapAndDatabaseAuthenticatable#valid? call.

Basically, I'd like it to be valid when either of the "parent" strategies are valid? But from this class, I can't access the "parent" strategy methods or mix them in without mixing in too much. How should I 开发者_开发知识库approach this?

0

精彩评论

暂无评论...
验证码 换一张
取 消