Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with CakeRequest not getting token #10

Open
alexwebster opened this issue Feb 16, 2017 · 0 comments
Open

Issue with CakeRequest not getting token #10

alexwebster opened this issue Feb 16, 2017 · 0 comments

Comments

@alexwebster
Copy link

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.

@alexwebster alexwebster changed the title Issue with CakeRequest not getting Toekn Issue with CakeRequest not getting token Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant