Drop PHP 5.2 Support
It is approaching the day where we need to drop PHP 5.2 support. The library is mature enough for users who need 5.2 compatibility, but for it to because the best it can be, we need to take advantages of features in PHP 5.3 and leave the old and crusty versions behind.
Agreed! And even PHP 5.3 is going to be EOLed soon with the release of PHP 5.5, so I think it's a good time to do this :smile:
On a related note, would you like to enable testing against PHP 5.5 in travis? 5.5 is entering RC at the moment, and I think it would be nice if we could test against it to catch any problems that might occur against 5.5 (not that I expect any problems).
We should add 5.5 as soon as it reaches an official release.
+1
Agreed, lets move on with PHP 5.5, I like the password_hash() function so that sensitive password is not stored in plain sight.
Question: Does it make more sense to hash the password or would it break oauth2 RFC?
Note: StackOverflow has a nice implementation for using bcrytpt() with PHP.
@alkhoo what password are you talking about? Either if its the user credentials or the client secret it is your responsibility to hash those passwords. That's your application code job, not this library. For example i have my Doctrine2 repositories implementing the Stirage interfaces and I'm thus able to integrate it with my application logic
To read between the lines:
- Yes, best to hash password with own application code and
- No, it wont break the oauth2 RFC or the php oauth flow
Next question: With bcrypt() or password_hash(), doesn't it make sense to update library (eg:"GrantType/UserCredentials.php") for a global hash instead of making sure the line $request->request("password") = bcrypt($password) exist in each application file?
The use of bcrypt or password_hash is up to the application. Implementing this is as easy as extending the checkUserCredentials method on the UserCredentials storage object
If any further discussion is required here, please open a new issue.
We can EOL PHP5.2 once we've addressed #27, #80, and #134. Also consider addressing #133 and #122.