3 ܓi,! @s~ddlZyddlZdZWnek r0dZYnXddlZddlmZmZmZddlm Z dZ dZ ej dZ Gd d d ZdS) NTF)datetime timedeltatimezone)TIMEOUT_DEFAULTz sos-toolsz,urn:ietf:params:oauth:grant-type:device_codeZsosc@sZeZdZdZddZddZddZdd Zd d Zd d Z ddZ ddZ dddZ dS)DeviceAuthorizationClassz$ Device Authorization Class cCs*d|_d|_d|_||_||_|jdS)N) _access_token_access_expires_at&_DeviceAuthorizationClass__device_codeclient_identifier_urltoken_endpoint_use_device_code_grant)selfr r r/usr/lib/python3.6/__init__.py__init__!s z!DeviceAuthorizationClass.__init__cCs$|jtd|j|jdS)zv Start the device auth flow. In the future we will store the tokens in an in-memory keyring. zr;r<r=rrrrrs "  r)Zloggingrr ImportErrorr-rrrZ sos.utilitiesrrr,Z getLoggerr.rrrrr s