piotzkhider/firebase-authentication-module
Composer 安装命令:
composer require piotzkhider/firebase-authentication-module
包简介
README 文档
README
Firebase Authentication Module for BEAR.Sunday
Installation
Composer install
$ composer require piotzkhider/firebase-authentication-module
Module install
use Piotzkhider\FirebaseAuthenticationModule\FirebaseAuthenticationModule;
class AppModule extends AbstractAppModule { /** * {@inheritdoc} */ protected function configure() { $appDir = $this->appMeta->appDir; require_once $appDir . '/env.php'; ... $this->install(new FirebaseAuthenticationModule(getenv('GOOGLE_APPLICATION_CREDENTIALS'))); ... } }
@Authenticate
@Authenticate is a annotation for authentication.
Authentication process is executed before process the method.
class Tasks extends ResourceObject { /** * @Authenticate */ public function onGet(): ResourceObject {
The authenticated user can be defined directly as a method argument.
For that purpose it need specified in @Authenticate attribute.
And it set null of default parameter in last of arguments like @Assisted.
class Tasks extends ResourceObject { /** * @Authenticate(user="user") */ public function onGet(UserRecord $user = null): ResourceObject {
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-28