You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My CakePHP app is version 2.6.2. I have added this to my Auth Component in the AppController. 'JwtAuth.JwtToken' => array( 'fields' => array( 'username' => 'email', 'password' => 'password', 'token' => '_token' ), 'parameter' => '_token', 'contain' => array( 'Organization' ), 'scope' => array( 'User.status' => 'A', 'User.locked_out' => 0, 'Organization.status' => 'A', ), 'header' => 'X_JSON_WEB_TOKEN', 'pepper' => 'pepper' // Says pepper because I do not want to show the pepper key I used for my code ),
I know that the plugin runs because I add a die statement in the getUser function in the plugin and it shows up when I do the API request.
When I debug $request, I do not get the header as part of the request. I am using Postman for testing the API and Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjoiMTIiLCJzdWIiOiIxMiJ9LCJpYXQiOjE0ODcyNTUxMjYsImV4cCI6MTQ4NzI1ODcyNn0.5hoyXltPmEXIA3eVtJnnn3Dor2lhviej31eZNbaMbow for the token.
The text was updated successfully, but these errors were encountered:
alexwebster
changed the title
Issue with CakeRequest not getting Toekn
Issue with CakeRequest not getting token
Feb 22, 2017
My CakePHP app is version 2.6.2. I have added this to my Auth Component in the AppController.
'JwtAuth.JwtToken' => array( 'fields' => array( 'username' => 'email', 'password' => 'password', 'token' => '_token' ), 'parameter' => '_token', 'contain' => array( 'Organization' ), 'scope' => array( 'User.status' => 'A', 'User.locked_out' => 0, 'Organization.status' => 'A', ), 'header' => 'X_JSON_WEB_TOKEN', 'pepper' => 'pepper' // Says pepper because I do not want to show the pepper key I used for my code ),
I know that the plugin runs because I add a die statement in the getUser function in the plugin and it shows up when I do the API request.
When I debug $request, I do not get the header as part of the request. I am using Postman for testing the API and
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjoiMTIiLCJzdWIiOiIxMiJ9LCJpYXQiOjE0ODcyNTUxMjYsImV4cCI6MTQ4NzI1ODcyNn0.5hoyXltPmEXIA3eVtJnnn3Dor2lhviej31eZNbaMbow
for the token.The text was updated successfully, but these errors were encountered: