util/requests.py
def auth():
    """
    Authenticate, generate new JWT access token and cache it
    :return: JWT access token
    """
    try:
        response = requests.post(
            util.utils.get_property('endpoints', 'auth'),
            headers={
                'Authorization': 'APIKEY {}'.format(util.utils.get_api_key())
            }
        )
        util.utils.cache_token(response.content.decode())
        return response.json()['access_token']
    except Exception as e:
        util.utils.log('Authentication failed.', level=2)
        util.utils.log(e, level=2)
        return None

    Authenticate, generate new JWT access token and cache it
    :return: JWT access token
    
Authenticate, generate new JWT access token and cache it
Authenticate generate new JWT access token and cache it
def auth():
    try:
        response = requests.post(
            util.utils.get_property('endpoints', 'auth'),
            headers={
                'Authorization': 'APIKEY {}'.format(util.utils.get_api_key())
            }
        )
        util.utils.cache_token(response.content.decode())
        return response.json()['access_token']
    except Exception as e:
        util.utils.log('Authentication failed.', level=2)
        util.utils.log(e, level=2)
        return None
def auth ( ) : try : response = requests . post ( util . utils . get_property ( 'endpoints' , 'auth' ) , headers = { 'Authorization' : 'APIKEY {}' . format ( util . utils . get_api_key ( ) ) } ) util . utils . cache_token ( response . content . decode ( ) ) return response . json ( ) [ 'access_token' ] except Exception as e : util . utils . log ( 'Authentication failed.' , level = 2 ) util . utils . log ( e , level = 2 ) return None
Authenticate, generate new JWT access token and cache it
Authenticate generate new JWT access token and cache it
"""
    Authenticate, generate new JWT access token and cache it
    :return: JWT access token
    """
JWT access token
JWT access token