Connexion request user (#435)

* Add back connexion.request

* Refactor code to lifecycle module

* Test user from connexion.request instance
This commit is contained in:
Rafael Carício
2017-04-07 16:15:09 +02:00
committed by Henning Jacobs
parent a95b986d81
commit 63abcad512
12 changed files with 73 additions and 52 deletions

View File

@@ -82,6 +82,10 @@ def test_security(oauth_requests, secure_endpoint_app):
get_bye_from_flask = app_client.get('/v1.0/byesecure-from-flask', headers=headers) # type: flask.Response
assert get_bye_from_flask.data == b'Goodbye test-user (Secure!)'
headers = {"Authorization": "Bearer 100"}
get_bye_from_connexion = app_client.get('/v1.0/byesecure-from-connexion', headers=headers) # type: flask.Response
assert get_bye_from_connexion.data == b'Goodbye test-user (Secure!)'
def test_checking_that_client_token_has_all_necessary_scopes(
oauth_requests, secure_endpoint_app):