laminas-api-tools / api-tools-oauth2

Laminas module for implementing an OAuth2 server
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
11 stars 15 forks source link

An error occurred during execution #7

Open weierophinney opened 4 years ago

weierophinney commented 4 years ago

Hello i installed as documented

  1. update application.config
    'modules' => array( 'Application', 'ZF\ApiProblem', 'ZF\ContentNegotiation', 'ZF\OAuth2', ),

  2. update module.config.php in /vendor/zf-campus/zf-oauth2/config/oauth2.local.php return array( 'zf-oauth2' => array( 'db' => array( 'dsn' => 'mysql:dbname=test2;host=localhost', // for example "mysql:dbname=oauth2_db;host=localhost" 'username' => 'root', 'password' => 'abc123', ), 'allow_implicit' => true, // default (set to true when you need to support browser-based or mobile apps) 'access_lifetime' => 3600, // default (set a value in seconds for access tokens lifetime) 'enforce_state' => true, // default 'storage' => 'ZF\OAuth2\Adapter\PdoAdapter', // service name for the OAuth2 storage adapter ), );

  3. update module.config.php in /vendor/zf-campus/zf-oauth2/config/module.config.php 'service_manager' => [ 'aliases' => [ // Provider\UserId::class => Provider\UserId\AuthenticationService::class, 'ZF\OAuth2\Provider\UserId' => 'ZF\OAuth2\Provider\UserId\AuthenticationService', ],

  4. i create the database and entries

  5. http --auth testclient:testpass -f POST http://127.0.0.1/test6/public/oauth grant_type=client_credentials

But when i run the http it's give me error An error occurred during execution; please try again later. Could you tell me what i miss??

Thanks for help.


Originally posted by @mahabub398 at https://github.com/zfcampus/zf-oauth2/issues/158