Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Return Call NameLoad Num Str Str orelse TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Return Call NameLoad Num Str Str Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Dict Str NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Return Call NameLoad Num Str Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore BinOpBitAnd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Return Call NameLoad Num Str Str Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Return Call NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A 
Copyright 2015 Zalando SE

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
 language governing permissions and limitations under the License.
 N/A functools N/A logging N/A os N/A requests flask request problem problem N/A logger N/A N/A logging getLogger connexion.api.security N/A adapter N/A N/A N/A requests adapters HTTPAdapter pool_connections 100 pool_maxsize 100 N/A session N/A N/A requests Session N/A N/A N/A session mount http:// adapter N/A N/A N/A session mount https:// adapter get_tokeninfo_url N/A N/A security_definition N/A N/A N/A 
    :type security_definition: dict
    :rtype: str

    >>> get_tokeninfo_url({'x-tokenInfoUrl': 'foo'})
    'foo'
     N/A token_info_url N/A N/A N/A security_definition get x-tokenInfoUrl N/A N/A N/A os environ get TOKENINFO_URL N/A token_info_url N/A security_passthrough N/A N/A function N/A N/A N/A 
    :type function: types.FunctionType
    :rtype: types.FunctionType
     N/A function N/A verify_oauth N/A N/A token_info_url allowed_scopes function N/A N/A N/A 
    Decorator to verify oauth

    :param token_info_url: Url to get information about the token
    :type token_info_url: str
    :param allowed_scopes: Set with scopes that are allowed to access the endpoint
    :type allowed_scopes: set
    :type function: types.FunctionType
    :rtype: types.FunctionType
     wrapper N/A N/A N/A args kwargs N/A N/A N/A N/A logger debug %s Oauth verification... N/A request url N/A authorization N/A N/A N/A request headers get Authorization N/A N/A authorization N/A N/A N/A N/A logger info ... No auth provided. Aborting with 401. N/A N/A problem 401 Unauthorized No authorization token provided N/A N/A N/A N/A N/A _ token N/A N/A authorization split N/A N/A N/A ValueError N/A N/A N/A problem 401 Unauthorized Invalid authorization header N/A N/A N/A logger debug ... Getting token '%s' from %s token token_info_url N/A token_request N/A N/A session get token_info_url params N/A access_token token timeout 5 N/A N/A N/A logger debug ... Token info (%d): %s N/A token_request status_code N/A token_request text N/A N/A N/A token_request ok N/A N/A N/A problem 401 Unauthorized Provided oauth token is not valid N/A token_info N/A N/A token_request json N/A user_scopes N/A set N/A token_info N/A scope N/A scopes_intersection N/A user_scopes allowed_scopes N/A N/A N/A logger debug ... Scope intersection: %s scopes_intersection N/A N/A scopes_intersection N/A N/A N/A N/A logger info ... User scopes (%s) don't include one of the allowed scopes (%s). Aborting with 401. user_scopes allowed_scopes N/A N/A problem 403 Forbidden Provided token doesn't have the required scope N/A N/A N/A logger info ... Token authenticated. N/A N/A request user N/A N/A token_info get uid N/A N/A request token_info token_info N/A N/A function args kwargs N/A N/A N/A functools wraps function N/A wrapper N/A