55 lines
2.1 KiB
Markdown
55 lines
2.1 KiB
Markdown
# OAuth Center
|
|
|
|
 [](https://packagist.org/packages/foskym/flarum-oauth-center) [](https://packagist.org/packages/foskym/flarum-oauth-center)
|
|
|
|
A [Flarum](http://flarum.org) extension. Allow user to authorize the third clients
|
|
|
|
## Installation
|
|
|
|
Install with composer:
|
|
|
|
```sh
|
|
composer require foskym/flarum-oauth-center:"*"
|
|
```
|
|
|
|
## Updating
|
|
|
|
```sh
|
|
composer update foskym/flarum-oauth-center:"*"
|
|
php flarum migrate
|
|
php flarum cache:clear
|
|
```
|
|
|
|
## Usage
|
|
|
|
### setting
|
|

|
|
|
|
### create a client
|
|

|
|
|
|
### set scope for your resources (user.read is default scope)
|
|

|
|
|
|
### uri
|
|
authorize: `/oauth/authorize`
|
|
|
|
token: `/oauth/token`
|
|
|
|
resource(user): `/api/user`
|
|
|
|
### do it as normal OAuth client
|
|

|
|
|
|
### get access token after authorized
|
|

|
|
|
|
### using token to access resources (get or header)
|
|

|
|

|
|
|
|
## Links
|
|
|
|
- [Packagist](https://packagist.org/packages/foskym/flarum-oauth-center)
|
|
- [GitHub](https://github.com/foskym/flarum-oauth-center)
|
|
- [Discuss](https://discuss.flarum.org/d/33413-oauth-center)
|