zf-fr / zfr-oauth2-server

PHP library for creating an OAuth 2 server (currently proof of concept)
BSD 3-Clause "New" or "Revised" License
36 stars 13 forks source link

Trigger exception if invalid token #28

Closed bakura10 closed 9 years ago

bakura10 commented 9 years ago

Previously, ZfrOAuth2 used to trigger an InvalidAccessTokenException if no token could be found in the request. However, if a token was expired or not found in database, it used to do nothing.

The logic is actually wrong: ZfrOAuth2 should instead throw this exception ONLY if a token is given BUT is expired, does not match scope or does not exist anymore.