RESTful-Drupal / restful

RESTful best practices for Drupal
https://drupal.org/project/restful
419 stars 173 forks source link

Authentication Token - Only if getAccount call #1027

Open jesusrv26 opened 6 years ago

jesusrv26 commented 6 years ago

Hi!

I´m using 7.x-1.8 version because the server php version is 5.3.3. I tried to create a plugin with token authentication and i detected that only check resource access if some call to getAccount method.

Per example, I add an 'access callback' to check user_access, then token work perfectly because I need call getAccount, but if I not check any permission (i only require authenticated user), the resource it´s accesible although the acces_token is not sended in the request

It´s a bug or i have incorrectly configured the plugin?

$plugin = array( 'label' => t('Empresa'), 'resource' => 'empresa', 'name' => 'empresa__1_0', 'description' => '', 'class' => 'Empresa__1_0', 'authentication_types' => array( 'token', ), 'authentication_optional' => FALSE, 'major_version' => 1, 'minor_version' => 0, );

Thank you!