peekabooauth / peekaboo-bundle
Peekaboo Bundle
1.3.6
2024-02-23 11:46 UTC
Requires
- php: >=8.1
- ext-json: *
- psr/log: ^1|^2|^3
- symfony/framework-bundle: ^6.1|^7.0
- symfony/http-client: ^6.1|^7.0
- symfony/http-foundation: ^6.1|^7.0
- symfony/http-kernel: ^6.1|^7.0
- symfony/routing: ^6.1|^7.0
- symfony/security-core: ^6.1|^7.0
- symfony/security-http: ^6.1|^7.0
- symfony/validator: ^6.1|^7.0
Requires (Dev)
- phpspec/prophecy-phpunit: ^2.0
- phpunit/phpunit: ^10.0
- roave/security-advisories: dev-latest
- dev-main
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.1
- 1.2.0
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- v1.0.8
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-feature/fix-auth-by-API_KEY
This package is auto-updated.
Last update: 2024-09-23 12:59:36 UTC
README
安装
composer require peekabooauth/peekaboo-bundle
添加到 config/bundles.php
Peekabooauth\PeekabooBundle\PeekabooBundle::class => ['all' => true]
添加到 config/routes/annotations.yaml
peekaboo: resource: '@PeekabooBundle/Resources/config/routes.yaml'
添加到 config/packages/security.yaml
#...... providers: peekaboo_user_provider: id: Peekabooauth\PeekabooBundle\UserProvider\UserProvider #...... firewalls: peekaboo: pattern: ^/ custom_authenticators: - Peekabooauth\PeekabooBundle\Security\PeekabooAuthenticator provider: peekaboo_user_provider #....... access_control: - { path: ^/peekaboo/auth, roles: PUBLIC_ACCESS }
环境变量
IDENTITY_SERVER_URL_EXTERNAL=https://peekabooauth.com IDENTITY_SERVER_AUTH_PATH=/identity/auth IDENTITY_SERVER_LOGOUT_PATH=/identity/logout ROUTE_AFTER_REDIRECT=homepage IDENTITY_SERVER_URL_INTERNAL=https://peekabooauth.com PEEKABOO_APPLICATION_NAME=atlas PEEKABOO_APPLICATION_SECRET=cb76217cd4ebae7b85f93312d8606c7e PEEKABOO_AUTOLOGIN=
API 身份验证
curl -X POST -H "Content-Type: application/json" https://peekabooauth.com/api/login_check -d '{"username":"user@example.com","password":"123456"}'
本地开发
如果你想在未连接到真实服务器的情况下测试应用程序(适用于离线开发)则设置环境变量 IDENTITY_SERVER_URL_INTERNAL=https://peekabooauth.dev。然后你可以立即获取有效用户,而不需要使用身份验证服务器。
自动登录
设置 PEEKABOO_AUTOLOGIN=google 或 PEEKABOO_AUTOLOGIN=facebook 以跳过登录表单并通过 Google 或 Facebook 自动登录。也可以设置为 google_js、facebook_js 以显示登录页面,但自动点击通过 Google 或 Facebook 的登录按钮。
默认 - 空值 - 显示登录表单,不自动登录。