oauth2-server-php icon indicating copy to clipboard operation
oauth2-server-php copied to clipboard

Drop PHP 5.2 Support

Open bshaffer opened this issue 13 years ago • 9 comments

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.

bshaffer avatar May 09 '13 15:05 bshaffer

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:

F21 avatar May 13 '13 04:05 F21

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).

F21 avatar May 14 '13 12:05 F21

We should add 5.5 as soon as it reaches an official release.

bshaffer avatar May 15 '13 00:05 bshaffer

+1

mariano avatar May 15 '13 22:05 mariano

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 avatar May 19 '13 18:05 alkhoo

@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

mariano avatar May 19 '13 18:05 mariano

To read between the lines:

  1. Yes, best to hash password with own application code and
  2. 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?

alkhoo avatar May 19 '13 19:05 alkhoo

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.

bshaffer avatar May 19 '13 20:05 bshaffer

We can EOL PHP5.2 once we've addressed #27, #80, and #134. Also consider addressing #133 and #122.

bshaffer avatar May 26 '13 18:05 bshaffer