ib-lundgren / flask-oauthprovider

Create a secure OAuth provider easily, powered by OAuthLib
BSD 3-Clause "New" or "Revised" License
86 stars 21 forks source link

require_oauth decorator was always succeeding. #5

Closed datalogics-kam closed 11 years ago

datalogics-kam commented 11 years ago

verify_request() returns a tuple of (valid, oauth_request). The code was treating it as if it returned just a bool, and since the never-empty tuple was always truthy, requests always seemed to work.

Fixes ib-lundgren/flask-oauthprovider/#3

ib-lundgren commented 11 years ago

Thanks for the PR and sorry for the late reply. Ideally the unpacking would be done directly rather than unpacking but that's just details. Merging.

valid, oauth_request  = self.verify_request(...