aws_aad_creds/aad.py
def _block_and_wait_for_signin(self, device_code):
        """ Waits for the user to sign in """
        # Block the thread, until we get confirmation that the token has
        # been claimed or we time out
        tpe = ThreadPoolExecutor(max_workers=1)
        futures = []

        # Add our poll job promise to the queue
        futures.append(tpe.submit(
            self._adal_context.acquire_token_with_device_code,
            self._middleware_client_id, device_code, self._cli_client_id
        ))

        # Store the result if we get one inside 10 seconds, otherwise bail
        # Blocking starts here...
        result = concurrent.futures.wait(futures, timeout=60)
        if len(result.done) == 1:
            token = result.done.pop().result()
        else:
            self._adal_context.cancel_request_to_get_token_with_device_code(device_code)  # noqa: E501
            raise Exception("Device token flow has timed out")
        return token
 Waits for the user to sign in 
Waits for the user to sign in
Waits for the user to sign in
def _block_and_wait_for_signin(self, device_code):
        tpe = ThreadPoolExecutor(max_workers=1)
        futures = []
        futures.append(tpe.submit(
            self._adal_context.acquire_token_with_device_code,
            self._middleware_client_id, device_code, self._cli_client_id
        ))
        result = concurrent.futures.wait(futures, timeout=60)
        if len(result.done) == 1:
            token = result.done.pop().result()
        else:
            self._adal_context.cancel_request_to_get_token_with_device_code(device_code)  
            raise Exception("Device token flow has timed out")
        return token
def _block_and_wait_for_signin ( self , device_code ) : tpe = ThreadPoolExecutor ( max_workers = 1 ) futures = [ ] futures . append ( tpe . submit ( self . _adal_context . acquire_token_with_device_code , self . _middleware_client_id , device_code , self . _cli_client_id ) ) result = concurrent . futures . wait ( futures , timeout = 60 ) if len ( result . done ) == 1 : token = result . done . pop ( ) . result ( ) else : self . _adal_context . cancel_request_to_get_token_with_device_code ( device_code ) raise Exception ( "Device token flow has timed out" ) return token
Waits for the user to sign in
Waits for the user to sign in
""" Waits for the user to sign in """ # Block the thread, until we get confirmation that the token has
 # been claimed or we time out
 # Add our poll job promise to the queue
 # Store the result if we get one inside 10 seconds, otherwise bail
 # Blocking starts here...
 # noqa: E501

self
device_code