plc-xi / core
Core Module for PLC XI Api Server
Installs: 4
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ~8.1.0
- laminas-api-tools/api-tools: ^1.6.0
- laminas-api-tools/api-tools-content-negotiation: ^1.6.0
- laminas-api-tools/api-tools-documentation: ^1.3
- laminas-api-tools/api-tools-rest: ^1.6.1
- laminas/laminas-component-installer: ^2.1.1
- laminas/laminas-development-mode: ^3.2
- laminas/laminas-zendframework-bridge: ^1.0
Requires (Dev)
- laminas-api-tools/api-tools-admin: ^2.0.1
- laminas-api-tools/api-tools-asset-manager: ^1.2
- laminas/laminas-cli: ^1.2
- laminas/laminas-coding-standard: ~2.3.0
- laminas/laminas-composer-autoloading: ^3.1
- laminas/laminas-developer-tools: ^2.3
- laminas/laminas-test: ^4.0
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.5.20
- psalm/plugin-phpunit: ^0.16.1
- roave/security-advisories: dev-master
- vimeo/psalm: ^4.10
Suggests
- laminas-api-tools/api-tools-doctrine: laminas-api-tools/api-tools-doctrine ^2.2 to create Doctrine-Connected REST services
- laminas-api-tools/api-tools-http-cache: laminas-api-tools/api-tools-http-cache ^1.4 to add HTTP caching to your API
- zfr/zfr-cors: zfr/zfr-cors ^1.5 to add CORS support to your API
Conflicts
- laminas/laminas-hydrator: <2.0
- laminas/laminas-stdlib: <3.2.1
- laminas/laminas-view: <2.10.1
This package is auto-updated.
Last update: 2024-12-27 06:35:30 UTC
README
Core Module for onePlace XI Api Server.
How to start locally
- Enter Projekt directory, run
composer install
- Create
config/autoload/local.php
- Start Dev Server
php -S 0.0.0.0:8080 -t public public/index.php
- The API is now running on localhost:8080
return [ 'db' => [ 'adapters' => [ 'api' => [ 'database' => 'nameOfYourDatabase', 'driver' => 'PDO_Mysql', 'username' => 'databaseUser', 'password' => 'databasePassword', ], ], ], 'api-tools-mvc-auth' => [ 'authentication' => [ 'adapters' => [ 'api' => [ 'adapter' => \Laminas\ApiTools\MvcAuth\Authentication\OAuth2Adapter::class, 'storage' => [ 'adapter' => \pdo::class, 'dsn' => 'mysql:dbname=nameOfYourDatabase;host=localhost;charset=utf8', 'route' => '/oauth', 'username' => 'databaseUser', 'password' => 'databasePassword', ], ], ], ], ], ];
Configure Authentication
- Insert a new row into
oauth_clients
tableclient_id
is the username for your clientclient_secret
is the hashed password for your client- You can use
php .\vendor\laminas-api-tools\api-tools-oauth2\bin\bcrypt.php yourPassword
to generate a bcrypt hash
- You can use