helllomatt / aspen-user-api
API module for the ASPEN framework to manage users and authentication.
1.0
2017-05-09 16:46 UTC
Requires
- php: >=5.6.0
- bshaffer/oauth2-server-php: ~1.8
- helllomatt/basically: ^0.3
- helllomatt/double: ^1.1
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is not auto-updated.
Last update: 2025-04-12 22:52:58 UTC
README
This is an API used to allow for user management using the ASPEN framework. Users can:
- Register new accounts
- Activate accounts
- Reset passwords via request
- Log in via OAuth2 or Session
- Update information (when logged in)
- Change their password (when logged in)
How to install
There's two parts: firstly install the package, secondly set up the database.
Installing the package:
composer require helllomatt/aspen-user-api
Setting up the database:
- Navigate to the package
.../vendor/helllomatt/aspen-user-api
- In the root folder you'll find
db.sql
- Import
db.sql
into your database
Code updates
In your index.php
file there are two changes that need to be made.
- Add
session_start()
underrequire 'vendor/autoload.php'
(if you plan to use session based auth) - Add
vendor/helllomatt/aspen-user-api
to the manager'sload()
array
After that, you're ready to use the API.
Running tests
Tests require an actual database connection.
Modify the phpunit.xml
file to reflect your database setup for running tests.