GithubHelp home page GithubHelp logo

cakephp2-jwt-auth's People

Contributors

codeeverything avatar t73biz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cakephp2-jwt-auth's Issues

Issue with CakeRequest not getting token

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.

PHPUnit 4.x not supported by CakePHP 2.x

Hi,

One of the requirements in your composer.json is for PHPUnit 4.6, but CakePHP 2.x only support up to version 3.7.38 (http://book.cakephp.org/2.0/en/development/testing.html).

I also get an error when trying to install this with composer: "t73biz/cakephp2-jwt-auth 1.0.6 requires phpunit/phpunit ~4.6 -> no matching package found.".

Looking at the PHPUnit repo. I don't see a tag for "4.6", only "4.6.x", so perhaps this should be "~4.6.x" in your composer.json? (I'm not sure. Composer is not my strong suit).

In any case, can't install this currently on CakePHP 2.7.x.

Thanks,

Mike

Docs?

Hi,

Is there any documentation for your plugin? I don't have access to configure my server with the dependencies requires to run the Tests so I can't see any example of how to use this.

Thanks in Advance,

Bob.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.