delboy1978uk / oauth2-api
An OAuth2 API built using Bone MVC Framework and the Extraordinary League's OAuth2 Server
Requires
- php: ^7.1
- ext-json: *
- delboy1978uk/bone: ^2.5.8
- delboy1978uk/cdn: ^1.1.2
- delboy1978uk/form: ^1.0.0
- delboy1978uk/image: ^1.0.0
- delboy1978uk/session: ^1.0
- delboy1978uk/user: ^3.0
- jms/serializer: ^1.11
- league/oauth2-client: ^2.4
- league/oauth2-server: ^7.0
- zircote/swagger-php: ^3.0
Requires (Dev)
- codeception/aspect-mock: *
- codeception/c3: ^2.4
- codeception/codeception: *
- flow/jsonpath: ^0.4.0
- namshi/cuzzle: ^2.0
This package is auto-updated.
Last update: 2024-10-20 11:10:10 UTC
README
An OAuth2 server built using Bone MVC Framework and the League of Extraordinary Package's OAuth2 Server lib.
Installation
composer create-project delboy1978uk/oauth2-api
Apache setup
Ensure your vhost is configured to run on a secure SSL port 443 connection.
Configure database credentials
Create a database with utf8mb4_unicode_ci
Go into the config folder, add db connection credentials for Bone MVC to use.
Also, edit migrant-cfg.php, and put connection details in there too.
Run database migrations
make sure vendor/bin is in your $PATH environment variables. Run:
migrant migrate
This will create several tables used by the OAuth2 library.
Set up Private & Public keys
See instructions here: http://oauth2.thephpleague.com/installation/#generating-public-and-private-keys
Copy the keys to the data/keys/ directory.
There is a sample public and private key for quick setup on development machines. Just remove the .sample extension.
Test API Endpoint
You can test your API is available by calling /ping
{"pong":"2017-03-21 13:44:49"}
Registering a Client
Instructions will appear once I've built this!
Command Line Tool
We'll have a CLI tool soon too! Stay tuned!