def _get_api_client_credentials(self, request) -> typing.Tuple[(typing.Optional[str], typing.Optional[str])]:
    params = parse_qs(request.body)
    client_id = None
    client_secret = None
    if request.headers.get('Authorization'):
        (auth_type, auth_info) = request.headers['Authorization'].split()
        if (auth_type == 'Basic'):
            (client_id, client_secret) = str(base64.b64decode(auth_info)).split(':')
    elif (params.get('client_id') and params.get('client_secret')):
        client_id = params.get('client_id')
        client_secret = params.get('client_secret')
    return (client_id, client_secret)
def _get_api_client_credentials(self, request) -> typing.Tuple[(typing.Optional[str], typing.Optional[str])]:
    params = parse_qs(request.body)
    client_id = None
    client_secret = None
    if request.headers.get('Authorization'):
        (auth_type, auth_info) = request.headers['Authorization'].split()
        if (auth_type == 'Basic'):
            (client_id, client_secret) = str(base64.b64decode(auth_info)).split(':')
    elif (params.get('client_id') and params.get('client_secret')):
        client_id = params.get('client_id')
        client_secret = params.get('client_secret')
    return (client_id, client_secret)