Play nice with Flask-HTTPAuth. #21

Merged
merged 3 commits into from Jul 7, 2014

Conversation

Projects
None yet
2 participants
Contributor

ryepdx commented May 18, 2014

Combining @jsonrpc.method and @auth.login_required from Flask-HTTPAuth resulted in ugly errors when unauthenticated requests were attempted. This fix checks to see if the returned object is a Flask Response object and passes on the "status" and "status_code" properties if so.

Owner

nycholas commented Jul 7, 2014

Hello,

Could you show me any example by use?

Sorry for delay.

Thanks!

nycholas merged commit 6fbcf8e into cenobites:master Jul 7, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Owner

nycholas commented Jul 7, 2014

@ryepdx,

I did merging into parts.

I like treat for Response[1] wrapper and method HTTP OPTIONS. But, I don't did merge with decorators implementation, I think very intrusive.

See the example[2] using Flask-HTTPAuth and check if you would like to do this.

Thank you very much!

[1] - http://werkzeug.pocoo.org/docs/wrappers/
[2] - https://github.com/cenobites/flask-jsonrpc/tree/master/examples/flask-httpauth

@nycholas nycholas added a commit that referenced this pull request Jul 7, 2014

@nycholas nycholas #21 Support py2k a518edc

nycholas referenced this pull request Feb 9, 2015

Closed

CORS? #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment