简体   繁体   English

有没有办法在没有数据库的情况下使用laravel 4.2身份验证?

[英]Is there a way to use laravel 4.2 authentication without a database?

I am currently developing one plugin of a few larger projects. 我目前正在开发一些大型项目的插件。 To make testing easier, I created a separate project and will copy the code to the different projects after the plugin is well-tested. 为了简化测试,我创建了一个单独的项目,并将在插件经过良好测试后将代码复制到其他项目中。

The plugin will be using the authentication methods of the bigger project, so I don't want to create another one during testing. 该插件将使用更大项目的身份验证方法,因此我不想在测试期间创建另一个。 However, as some functions require testing with authentication, I will need to try using the authentication class with minimal set-up. 但是,由于某些功能需要通过身份验证进行测试,因此我将需要尝试使用最少的设置来使用身份验证类。 So, is there a way to use the authentication class to do simple login/logout without a database? 因此,有没有一种方法可以使用身份验证类在没有数据库的情况下进行简单的登录/注销?

If I understand you correctly, you need your own auth auth provider. 如果我理解正确,则需要您自己的身份验证提供程序。

You can read about it in docs 您可以在文档中阅读

Edit: Laravel 4.2 doc 编辑: Laravel 4.2 doc

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

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