Download the PHP package tourze/baidu-oauth2-integrate-bundle without Composer
On this page you can find all versions of the php package tourze/baidu-oauth2-integrate-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/baidu-oauth2-integrate-bundle
More information about tourze/baidu-oauth2-integrate-bundle
Files in tourze/baidu-oauth2-integrate-bundle
Package baidu-oauth2-integrate-bundle
Short Description Symfony bundle: Baidu OAuth2 integration with DB-backed configuration (Entity-based).
License MIT
Informations about the package baidu-oauth2-integrate-bundle
Baidu OAuth2 Integration Bundle
δΈζ
A Symfony bundle that provides Baidu OAuth2 integration for Symfony applications with database-backed configuration and Entity-based management.
Features
- π Complete OAuth2 Flow: Full implementation of Baidu OAuth2 authorization process
- ποΈ Database Configuration: Entity-based configuration management supporting multiple and dynamic configs
- ποΈ Symfony Integration: Fully compatible with Symfony 7.x ecosystem
- π‘οΈ State Management: Built-in CSRF protection and state token management
- π EasyAdmin Backend: Complete admin interface for management
- π§ Flexible Configuration: Support for custom scopes and redirect URIs
- π§ͺ Complete Testing: Comprehensive unit and integration tests
- π Detailed Logging: Full debugging and error logging
Installation
Install using Composer:
Quick Start
1. Enable Bundle
Add to your config/bundles.php:
2. Database Configuration
The bundle provides three main entities:
BaiduOAuth2Config: OAuth2 application configurationBaiduOAuth2State: State token managementBaiduOAuth2User: User information storage
Create and run database migrations:
3. Basic Usage
Generate Authorization URL
Handle Callback
Configuration
Basic Configuration
Add to config/packages/baidu_oauth2.yaml:
EasyAdmin Backend Management
The bundle automatically integrates with EasyAdmin, providing:
- OAuth2 configuration management
- User information management
- State token management
API Documentation
Main Services
BaiduOAuth2Service
The main OAuth2 flow service.
BaiduApiClient
Baidu API client for calling Baidu Open Platform APIs.
Routes
The bundle automatically registers the following routes:
baidu_oauth2_login: Baidu login entry pointbaidu_oauth2_callback: Baidu authorization callback
Entity Documentation
BaiduOAuth2Config
OAuth2 application configuration entity:
BaiduOAuth2User
User information entity:
BaiduOAuth2State
State token entity:
Testing
Run the test suite:
Events
The bundle provides the following Symfony events:
BaiduOAuth2TokenReceivedEvent: Token received successfullyBaiduOAuth2UserCreatedEvent: User information createdBaiduOAuth2TokenRefreshedEvent: Token refreshed successfully
Error Handling
The bundle provides dedicated exception classes:
Logging Configuration
Configure logging:
Security Considerations
- Redirect URI Security: Ensure redirect URIs are properly configured in Baidu Open Platform
- State Token Validation: Bundle automatically handles state token validation to prevent CSRF attacks
- Token Security: Access and refresh tokens are encrypted and stored in database
- HTTPS: Production environment must use HTTPS
- Key Management: Properly secure API Key and Secret Key
License
This project is licensed under the MIT License.
Contributing
Issues and Pull Requests are welcome. Please ensure:
- Follow PSR-12 coding standards
- Add appropriate tests
- Update relevant documentation
Changelog
See CHANGELOG.md for version updates.
Support
- π§ Email: [email protected]
- π Issue Reporting: GitHub Issues
- π Documentation: Project Wiki
Related Links
All versions of baidu-oauth2-integrate-bundle with dependencies
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
easycorp/easyadmin-bundle Version ^4
knplabs/knp-menu Version ^3.7
monolog/monolog Version ^3.1
psr/log Version ^3|^2|^1
symfony/cache-contracts Version ^3
symfony/config Version ^7.3
symfony/console Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/event-dispatcher-contracts Version ^3
symfony/framework-bundle Version ^7.3
symfony/http-client Version ^7.3
symfony/http-client-contracts Version ^3.6
symfony/http-foundation Version ^7.3
symfony/http-kernel Version ^7.3
symfony/property-access Version ^7.3
symfony/routing Version ^7.3
symfony/security-bundle Version ^7.3
symfony/security-core Version ^7.3
symfony/validator Version ^7.3
symfony/yaml Version ^7.3
tourze/bundle-dependency Version 1.*
tourze/doctrine-indexed-bundle Version 1.0.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/easy-admin-menu-bundle Version 1.0.*
tourze/symfony-dependency-service-loader Version 1.0.*
tourze/symfony-routing-auto-loader-bundle Version 1.0.*