users-au/users-au-laravel-client
最新稳定版本:1.1.2
Composer 安装命令:
composer require users-au/users-au-laravel-client
包简介
Users.au Laravel Client
README 文档
README
Introduction
This package is a Laravel client for Users.au oauth. It provides a simple way to integrate your Laravel application to log in with Users.au.
Installation
Requirements:
To get the latest version, simply run:
composer require users-au/laravel-client
Then do vendor publish:
php artisan vendor:publish --provider="Usersau\UsersauLaravelClient\UsersauLaravelClientServiceProvider"
Modify user model:
$this->fillable = [ ... 'usersau_id', 'usersau_access_token', 'usersau_refresh_token', ]; $this->hidden = [ ... 'usersau_id', 'usersau_access_token', 'usersau_refresh_token', ];
Add configuration to config/services.php
'usersau' => [ 'client_id' => env('USERSAU_CLIENT_ID'), 'client_secret' => env('USERSAU_CLIENT_SECRET'), 'redirect' => env('USERSAU_REDIRECT_URI'), 'host' => env('USERSAU_HOST'), ],
If you need to register the service provider manually. Open config/app.php and add the following to the providers array:
Usersau\UsersauLaravelClient\UsersauLaravelClientServiceProvider::class,
Run the migrations:
php artisan migrate
Configuration
Users.au Client ID and Secret
You will need to register your application with Users.au to receive a Client ID and Client Secret. You can do this at https://www.users.au.
Environment variables
You can set the following environment variables in your .env file:
USERSAU_CLIENT_ID="your_client_id"
USERSAU_CLIENT_SECRET="your_client_secret"
USERSAU_REDIRECT_URI="https://www.yourdomain.com/auth/usersau/callback"
USERSAU_HOST="https://auth.youdomain.com"
TODO
- Add tests
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 136
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-06