Module ImportFrom alias Import alias Import alias Import alias ImportFrom alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults kwarg body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Return NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body If UnaryOpNot Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr Lambda arguments args NameParam NameParam defaults Call AttributeLoad NameLoad attr CompareIn NameLoad NameLoad Assign AttributeStore NameLoad attr Dict Str Str Str Str Str Str Str Str Str BinOpAdd NameLoad Num Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Call NameLoad AttributeLoad NameLoad attr keyword Str Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr ListLoad Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpAdd Str SubscriptLoad AttributeLoad NameLoad attr Index Str FunctionDef arguments args NameParam defaults kwarg body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad If CompareIn Call AttributeLoad Str attr Str AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Call AttributeLoad Str attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Return NameLoad decorator_list For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Delete SubscriptDel AttributeLoad NameLoad attr Index Str FunctionDef arguments args NameParam defaults kwarg body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword Str keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list Call AttributeLoad NameLoad attr Str keyword Lambda arguments args defaults NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpAdd Str Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr Str keyword Lambda arguments args defaults NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Dict Str Str For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad NameLoad attr Str keyword Lambda arguments args defaults NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpSub Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore NameLoad Index Str BinOpAdd NameLoad Num Assign NameStore Str With Call AttributeLoad NameLoad attr Str Lambda arguments args defaults NameLoad body For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign AttributeStore AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Delete AttributeDel NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign AttributeStore AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Delete AttributeDel NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Dict Str Str Assign NameStore Call NameLoad Str keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign SubscriptStore NameLoad Index Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad With Call AttributeLoad NameLoad attr NameLoad body Delete AttributeDel NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults kwarg body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Return NameLoad decorator_list Assign NameStore Str For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr Str keyword Lambda arguments args defaults NameLoad decorator_list
N/A __future__ unicode_literals N/A json N/A mock N/A time copy deepcopy N/A N/A unittest2 TestCase N/A N/A N/A ImportError N/A unittest TestCase oauthlib.common urlencode oauthlib.oauth2 TokenExpiredError OAuth2Error oauthlib.oauth2 MismatchingStateError oauthlib.oauth2 WebApplicationClient MobileApplicationClient oauthlib.oauth2 LegacyApplicationClient BackendApplicationClient requests_oauthlib OAuth2Session TokenUpdated N/A fake_time N/A N/A time time fake_token N/A N/A token N/A N/A fake_send N/A N/A r N/A kwargs N/A N/A resp N/A N/A mock MagicMock N/A N/A resp text N/A N/A json dumps token N/A resp N/A N/A fake_send N/A OAuth2SessionTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A hasattr self assertIn N/A N/A N/A self assertIn N/A N/A N/A a b N/A N/A N/A self assertTrue N/A a b N/A N/A self token N/A token_type access_token refresh_token expires_in expires_at Bearer asdfoiw37850234lkjsdfsdf sldvafkjw34509s8dfsdf 3600 N/A fake_time 3600 N/A N/A self client_id foo N/A N/A self clients N/A N/A WebApplicationClient N/A self client_id code asdf345xdf N/A LegacyApplicationClient N/A self client_id N/A BackendApplicationClient N/A self client_id N/A N/A self all_clients N/A N/A self clients N/A N/A MobileApplicationClient N/A self client_id N/A test_add_token N/A N/A self N/A N/A N/A token N/A Bearer  N/A N/A self token N/A access_token verifier N/A N/A r N/A kwargs N/A N/A auth_header N/A N/A N/A r headers get Authorization None N/A N/A N/A N/A Authorization encode utf-8 N/A r headers N/A N/A auth_header N/A N/A r headers N/A N/A N/A Authorization encode utf-8 N/A N/A N/A self assertEqual auth_header token N/A resp N/A N/A mock MagicMock N/A N/A resp cookes N/A N/A resp N/A N/A client N/A self all_clients N/A N/A auth N/A OAuth2Session client client token N/A self token N/A N/A auth send verifier N/A N/A N/A auth get https://i.b N/A test_authorization_url N/A N/A self N/A N/A N/A url https://example.com/authorize?foo=bar N/A web N/A WebApplicationClient N/A self client_id N/A s N/A OAuth2Session client web N/A N/A auth_url state N/A N/A s authorization_url url N/A N/A N/A self assertIn state auth_url N/A N/A N/A self assertIn N/A self client_id auth_url N/A N/A N/A self assertIn response_type=code auth_url N/A mobile N/A MobileApplicationClient N/A self client_id N/A s N/A OAuth2Session client mobile N/A N/A auth_url state N/A N/A s authorization_url url N/A N/A N/A self assertIn state auth_url N/A N/A N/A self assertIn N/A self client_id auth_url N/A N/A N/A self assertIn response_type=token auth_url N/A test_refresh_token_request N/A N/A self N/A N/A N/A N/A self expired_token N/A dict N/A self token N/A N/A N/A self expired_token N/A expires_in -1 N/A N/A N/A self expired_token N/A expires_at fake_refresh N/A N/A r N/A kwargs N/A N/A resp N/A N/A mock MagicMock N/A N/A resp text N/A N/A json dumps N/A self token N/A resp N/A N/A client N/A self clients N/A N/A auth N/A OAuth2Session client client token N/A self expired_token N/A N/A N/A self assertRaises TokenExpiredError N/A auth get https://i.b N/A client N/A self clients N/A N/A auth N/A OAuth2Session client client token N/A self expired_token auto_refresh_url https://i.b/refresh N/A N/A auth send fake_refresh N/A N/A N/A self assertRaises TokenUpdated N/A auth get https://i.b token_updater N/A N/A token N/A N/A N/A N/A N/A self assertEqual token N/A self token N/A N/A client N/A self clients N/A N/A auth N/A OAuth2Session client client token N/A self expired_token auto_refresh_url https://i.b/refresh token_updater token_updater N/A N/A auth send fake_refresh N/A N/A N/A auth get https://i.b N/A N/A N/A mock patch time.time new N/A N/A N/A N/A fake_time test_token_from_fragment N/A N/A self N/A N/A N/A mobile N/A MobileApplicationClient N/A self client_id N/A response_url N/A https://i.b/callback# N/A urlencode N/A N/A N/A self token items N/A auth N/A OAuth2Session client mobile N/A N/A N/A self assertEqual N/A N/A auth token_from_fragment response_url N/A self token N/A N/A N/A mock patch time.time new N/A N/A N/A N/A fake_time test_fetch_token N/A N/A self N/A N/A N/A url https://example.com/token N/A client N/A self clients N/A N/A auth N/A OAuth2Session client client token N/A self token N/A N/A auth send N/A fake_token N/A self token N/A N/A N/A self assertEqual N/A N/A auth fetch_token url N/A self token N/A error N/A error invalid_request N/A client N/A self clients N/A N/A auth N/A OAuth2Session client client token N/A self token N/A N/A auth send N/A fake_token error N/A N/A N/A self assertRaises OAuth2Error N/A auth fetch_token url N/A N/A N/A mock patch time.time new N/A N/A N/A N/A fake_time test_cleans_previous_token_before_fetching_new_one N/A N/A self N/A N/A N/A Makes sure the previous token is cleaned before fetching a new one.

        The reason behind it is that, if the previous token is expired, this
        method shouldn't fail with a TokenExpiredError, since it's attempting
        to get a new one (which shouldn't be expired).

         N/A new_token N/A deepcopy N/A self token N/A past N/A N/A N/A time time 7200 N/A now N/A N/A time time N/A N/A N/A self token N/A expires_at past N/A N/A new_token N/A expires_at N/A now 3600 N/A url https://example.com/token N/A N/A N/A mock patch time.time N/A N/A N/A N/A now N/A N/A client N/A self clients N/A N/A auth N/A OAuth2Session client client token N/A self token N/A N/A auth send N/A fake_token new_token N/A N/A N/A self assertEqual N/A N/A auth fetch_token url new_token N/A test_web_app_fetch_token N/A N/A self N/A N/A N/A client N/A OAuth2Session foo state somestate N/A N/A N/A self assertRaises MismatchingStateError N/A client fetch_token https://i.b/token authorization_response https://i.b/no-state?code=abc N/A test_client_id_proxy N/A N/A self N/A N/A N/A sess N/A OAuth2Session test-id N/A N/A N/A self assertEqual N/A sess client_id test-id N/A N/A sess client_id different-id N/A N/A N/A self assertEqual N/A sess client_id different-id N/A N/A N/A sess _client client_id something-else N/A N/A N/A self assertEqual N/A sess client_id something-else N/A N/A sess client_id N/A N/A N/A self assertIsNone N/A sess client_id N/A test_access_token_proxy N/A N/A self N/A N/A N/A sess N/A OAuth2Session test-id N/A N/A N/A self assertIsNone N/A sess access_token N/A N/A sess access_token test-token N/A N/A N/A self assertEqual N/A sess access_token test-token N/A N/A N/A sess _client access_token different-token N/A N/A N/A self assertEqual N/A sess access_token different-token N/A N/A sess access_token N/A N/A N/A self assertIsNone N/A sess access_token N/A test_token_proxy N/A N/A self N/A N/A N/A token N/A access_token test-access N/A sess N/A OAuth2Session test-id token token N/A N/A N/A self assertEqual N/A sess access_token test-access N/A N/A N/A self assertEqual N/A sess token token N/A N/A token N/A access_token something-else N/A N/A sess token token N/A N/A N/A self assertEqual N/A sess access_token something-else N/A N/A N/A self assertEqual N/A sess token token N/A N/A N/A sess _client access_token different-token N/A N/A token N/A access_token different-token N/A N/A N/A self assertEqual N/A sess access_token different-token N/A N/A N/A self assertEqual N/A sess token token N/A N/A N/A self assertRaises AttributeError N/A N/A N/A sess token N/A test_authorized_false N/A N/A self N/A N/A N/A sess N/A OAuth2Session foo N/A N/A N/A self assertFalse N/A sess authorized N/A test_authorized_true N/A N/A self N/A N/A fake_token N/A N/A token N/A N/A fake_send N/A N/A r N/A kwargs N/A N/A resp N/A N/A mock MagicMock N/A N/A resp text N/A N/A json dumps token N/A resp N/A N/A fake_send N/A N/A url https://example.com/token N/A client N/A self clients N/A N/A sess N/A OAuth2Session client client N/A N/A sess send N/A fake_token N/A self token N/A N/A N/A self assertFalse N/A sess authorized N/A N/A N/A sess fetch_token url N/A N/A N/A self assertTrue N/A sess authorized N/A N/A N/A mock patch time.time new N/A N/A N/A N/A fake_time N/A