@backtomyfuture/exchange-cli-darwin-arm64 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/_internal/Python +0 -0
- package/bin/_internal/Python.framework/Python +0 -0
- package/bin/_internal/Python.framework/Resources/Info.plist +3 -3
- package/bin/_internal/Python.framework/Versions/3.12/Python +0 -0
- package/bin/_internal/Python.framework/Versions/{3.14 → 3.12}/Resources/Info.plist +3 -3
- package/bin/_internal/Python.framework/Versions/Current/Python +0 -0
- package/bin/_internal/Python.framework/Versions/Current/Resources/Info.plist +3 -3
- package/bin/_internal/_cffi_backend.cpython-312-darwin.so +0 -0
- package/bin/_internal/ada92cb5d92a588d1b93__mypyc.cpython-312-darwin.so +0 -0
- package/bin/_internal/base_library.zip +0 -0
- package/bin/_internal/certifi/cacert.pem +0 -631
- package/bin/_internal/charset_normalizer/{md.cpython-314-darwin.so → cd.cpython-312-darwin.so} +0 -0
- package/bin/_internal/charset_normalizer/{cd.cpython-314-darwin.so → md.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{click-8.3.2.dist-info → click-8.4.2.dist-info}/METADATA +1 -1
- package/bin/_internal/click-8.4.2.dist-info/RECORD +40 -0
- package/bin/_internal/cryptography/hazmat/bindings/_rust.abi3.so +0 -0
- package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/METADATA +7 -36
- package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/RECORD +137 -122
- package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/WHEEL +1 -1
- package/bin/_internal/cryptography-48.0.1.dist-info/sboms/cryptography-rust.cyclonedx.json +1362 -0
- package/bin/_internal/cryptography-48.0.1.dist-info/sboms/sbom.json +43 -0
- package/bin/_internal/exchangelib/__init__.py +120 -0
- package/bin/_internal/exchangelib/account.py +896 -0
- package/bin/_internal/exchangelib/attachments.py +268 -0
- package/bin/_internal/exchangelib/autodiscover/__init__.py +24 -0
- package/bin/_internal/exchangelib/autodiscover/cache.py +150 -0
- package/bin/_internal/exchangelib/autodiscover/discovery.py +491 -0
- package/bin/_internal/exchangelib/autodiscover/protocol.py +58 -0
- package/bin/_internal/exchangelib/configuration.py +106 -0
- package/bin/_internal/exchangelib/credentials.py +319 -0
- package/bin/_internal/exchangelib/errors.py +1710 -0
- package/bin/_internal/exchangelib/ewsdatetime.py +309 -0
- package/bin/_internal/exchangelib/extended_properties.py +311 -0
- package/bin/_internal/exchangelib/fields.py +1842 -0
- package/bin/_internal/exchangelib/folders/__init__.py +249 -0
- package/bin/_internal/exchangelib/folders/base.py +954 -0
- package/bin/_internal/exchangelib/folders/collections.py +576 -0
- package/bin/_internal/exchangelib/folders/known_folders.py +856 -0
- package/bin/_internal/exchangelib/folders/queryset.py +187 -0
- package/bin/_internal/exchangelib/folders/roots.py +390 -0
- package/bin/_internal/exchangelib/indexed_properties.py +96 -0
- package/bin/_internal/exchangelib/items/__init__.py +147 -0
- package/bin/_internal/exchangelib/items/base.py +241 -0
- package/bin/_internal/exchangelib/items/calendar_item.py +466 -0
- package/bin/_internal/exchangelib/items/contact.py +263 -0
- package/bin/_internal/exchangelib/items/item.py +413 -0
- package/bin/_internal/exchangelib/items/message.py +201 -0
- package/bin/_internal/exchangelib/items/post.py +38 -0
- package/bin/_internal/exchangelib/items/task.py +139 -0
- package/bin/_internal/exchangelib/properties.py +2364 -0
- package/bin/_internal/exchangelib/protocol.py +823 -0
- package/bin/_internal/exchangelib/queryset.py +691 -0
- package/bin/_internal/exchangelib/recurrence.py +349 -0
- package/bin/_internal/exchangelib/restriction.py +568 -0
- package/bin/_internal/exchangelib/services/__init__.py +117 -0
- package/bin/_internal/exchangelib/services/archive_item.py +33 -0
- package/bin/_internal/exchangelib/services/common.py +983 -0
- package/bin/_internal/exchangelib/services/convert_id.py +45 -0
- package/bin/_internal/exchangelib/services/copy_item.py +7 -0
- package/bin/_internal/exchangelib/services/create_attachment.py +34 -0
- package/bin/_internal/exchangelib/services/create_folder.py +45 -0
- package/bin/_internal/exchangelib/services/create_item.py +97 -0
- package/bin/_internal/exchangelib/services/create_user_configuration.py +19 -0
- package/bin/_internal/exchangelib/services/delete_attachment.py +28 -0
- package/bin/_internal/exchangelib/services/delete_folder.py +21 -0
- package/bin/_internal/exchangelib/services/delete_item.py +51 -0
- package/bin/_internal/exchangelib/services/delete_user_configuration.py +19 -0
- package/bin/_internal/exchangelib/services/empty_folder.py +25 -0
- package/bin/_internal/exchangelib/services/expand_dl.py +21 -0
- package/bin/_internal/exchangelib/services/export_items.py +27 -0
- package/bin/_internal/exchangelib/services/find_folder.py +80 -0
- package/bin/_internal/exchangelib/services/find_item.py +112 -0
- package/bin/_internal/exchangelib/services/find_people.py +106 -0
- package/bin/_internal/exchangelib/services/get_attachment.py +117 -0
- package/bin/_internal/exchangelib/services/get_delegate.py +45 -0
- package/bin/_internal/exchangelib/services/get_events.py +39 -0
- package/bin/_internal/exchangelib/services/get_folder.py +65 -0
- package/bin/_internal/exchangelib/services/get_item.py +41 -0
- package/bin/_internal/exchangelib/services/get_mail_tips.py +43 -0
- package/bin/_internal/exchangelib/services/get_persona.py +31 -0
- package/bin/_internal/exchangelib/services/get_room_lists.py +21 -0
- package/bin/_internal/exchangelib/services/get_rooms.py +21 -0
- package/bin/_internal/exchangelib/services/get_searchable_mailboxes.py +48 -0
- package/bin/_internal/exchangelib/services/get_server_time_zones.py +39 -0
- package/bin/_internal/exchangelib/services/get_streaming_events.py +102 -0
- package/bin/_internal/exchangelib/services/get_user_availability.py +67 -0
- package/bin/_internal/exchangelib/services/get_user_configuration.py +43 -0
- package/bin/_internal/exchangelib/services/get_user_oof_settings.py +40 -0
- package/bin/_internal/exchangelib/services/get_user_settings.py +87 -0
- package/bin/_internal/exchangelib/services/inbox_rules.py +104 -0
- package/bin/_internal/exchangelib/services/mark_as_junk.py +27 -0
- package/bin/_internal/exchangelib/services/move_folder.py +27 -0
- package/bin/_internal/exchangelib/services/move_item.py +28 -0
- package/bin/_internal/exchangelib/services/resolve_names.py +104 -0
- package/bin/_internal/exchangelib/services/send_item.py +26 -0
- package/bin/_internal/exchangelib/services/send_notification.py +43 -0
- package/bin/_internal/exchangelib/services/set_user_oof_settings.py +34 -0
- package/bin/_internal/exchangelib/services/subscribe.py +125 -0
- package/bin/_internal/exchangelib/services/sync_folder_hierarchy.py +95 -0
- package/bin/_internal/exchangelib/services/sync_folder_items.py +77 -0
- package/bin/_internal/exchangelib/services/unsubscribe.py +21 -0
- package/bin/_internal/exchangelib/services/update_folder.py +158 -0
- package/bin/_internal/exchangelib/services/update_item.py +113 -0
- package/bin/_internal/exchangelib/services/update_user_configuration.py +17 -0
- package/bin/_internal/exchangelib/services/upload_items.py +47 -0
- package/bin/_internal/exchangelib/settings.py +88 -0
- package/bin/_internal/exchangelib/transport.py +214 -0
- package/bin/_internal/exchangelib/util.py +894 -0
- package/bin/_internal/exchangelib/version.py +320 -0
- package/bin/_internal/exchangelib/winzone.py +662 -0
- package/bin/_internal/exchangelib-5.6.0.dist-info/INSTALLER +1 -0
- package/bin/_internal/exchangelib-5.6.0.dist-info/METADATA +77 -0
- package/bin/_internal/exchangelib-5.6.0.dist-info/RECORD +184 -0
- package/bin/_internal/exchangelib-5.6.0.dist-info/licenses/LICENSE +21 -0
- package/bin/_internal/exchangelib-5.6.0.dist-info/top_level.txt +1 -0
- package/bin/_internal/libcrypto.3.dylib +0 -0
- package/bin/_internal/libssl.3.dylib +0 -0
- package/bin/_internal/lxml/_elementpath.cpython-312-darwin.so +0 -0
- package/bin/_internal/lxml/builder.cpython-312-darwin.so +0 -0
- package/bin/_internal/lxml/{etree.cpython-314-darwin.so → etree.cpython-312-darwin.so} +0 -0
- package/bin/_internal/lxml/html/_difflib.cpython-312-darwin.so +0 -0
- package/bin/_internal/lxml/html/diff.cpython-312-darwin.so +0 -0
- package/bin/_internal/lxml/{objectify.cpython-314-darwin.so → objectify.cpython-312-darwin.so} +0 -0
- package/bin/_internal/lxml/sax.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_asyncio.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/termios.cpython-314-darwin.so → python3.12/lib-dynload/_bisect.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_sha2.cpython-314-darwin.so → python3.12/lib-dynload/_blake2.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_bz2.cpython-314-darwin.so → python3.12/lib-dynload/_bz2.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_codecs_cn.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_cn.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_codecs_hk.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_hk.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_interpqueues.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_iso2022.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_codecs_jp.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_jp.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_codecs_kr.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_kr.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_codecs_tw.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_tw.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_statistics.cpython-314-darwin.so → python3.12/lib-dynload/_contextvars.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_csv.cpython-314-darwin.so → python3.12/lib-dynload/_csv.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_ctypes.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_datetime.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_dbm.cpython-314-darwin.so → python3.12/lib-dynload/_dbm.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_decimal.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_elementtree.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_hashlib.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_heapq.cpython-314-darwin.so → python3.12/lib-dynload/_heapq.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_json.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_lzma.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_md5.cpython-314-darwin.so → python3.12/lib-dynload/_md5.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_multibytecodec.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_multiprocessing.cpython-314-darwin.so → python3.12/lib-dynload/_multiprocessing.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_opcode.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_pickle.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_bisect.cpython-314-darwin.so → python3.12/lib-dynload/_posixshmem.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_posixsubprocess.cpython-314-darwin.so → python3.12/lib-dynload/_posixsubprocess.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_queue.cpython-314-darwin.so → python3.12/lib-dynload/_queue.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_random.cpython-314-darwin.so → python3.12/lib-dynload/_random.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_scproxy.cpython-314-darwin.so → python3.12/lib-dynload/_scproxy.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_sha1.cpython-314-darwin.so → python3.12/lib-dynload/_sha1.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_sha2.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_blake2.cpython-314-darwin.so → python3.12/lib-dynload/_sha3.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_socket.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_ssl.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_posixshmem.cpython-314-darwin.so → python3.12/lib-dynload/_statistics.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_struct.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_uuid.cpython-314-darwin.so → python3.12/lib-dynload/_uuid.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_zoneinfo.cpython-314-darwin.so → python3.12/lib-dynload/_zoneinfo.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/array.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/binascii.cpython-314-darwin.so → python3.12/lib-dynload/binascii.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/fcntl.cpython-314-darwin.so → python3.12/lib-dynload/fcntl.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/grp.cpython-314-darwin.so → python3.12/lib-dynload/grp.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/math.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_sha3.cpython-314-darwin.so → python3.12/lib-dynload/mmap.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/pyexpat.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/readline.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/resource.cpython-314-darwin.so → python3.12/lib-dynload/resource.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/select.cpython-314-darwin.so → python3.12/lib-dynload/select.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/syslog.cpython-314-darwin.so → python3.12/lib-dynload/syslog.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/termios.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/unicodedata.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/zlib.cpython-312-darwin.so +0 -0
- package/bin/_internal/tzdata/zoneinfo/Africa/Casablanca +0 -0
- package/bin/_internal/tzdata/zoneinfo/Africa/El_Aaiun +0 -0
- package/bin/_internal/tzdata/zoneinfo/America/Edmonton +0 -0
- package/bin/_internal/tzdata/zoneinfo/America/Vancouver +0 -0
- package/bin/_internal/tzdata/zoneinfo/America/Yellowknife +0 -0
- package/bin/_internal/tzdata/zoneinfo/Asia/Ho_Chi_Minh +0 -0
- package/bin/_internal/tzdata/zoneinfo/Asia/Saigon +0 -0
- package/bin/_internal/tzdata/zoneinfo/Canada/Mountain +0 -0
- package/bin/_internal/tzdata/zoneinfo/Canada/Pacific +0 -0
- package/bin/_internal/tzdata/zoneinfo/leapseconds +4 -4
- package/bin/_internal/tzdata/zoneinfo/tzdata.zi +11 -131
- package/bin/_internal/tzdata/zoneinfo/zone.tab +2 -2
- package/bin/_internal/tzdata/zoneinfo/zone1970.tab +2 -2
- package/bin/_internal/tzdata/zoneinfo/zonenow.tab +8 -2
- package/bin/exchange-cli +0 -0
- package/package.json +10 -7
- package/bin/_internal/81d243bd2c585b0f4821__mypyc.cpython-314-darwin.so +0 -0
- package/bin/_internal/Python.framework/Versions/3.14/Python +0 -0
- package/bin/_internal/_cffi_backend.cpython-314-darwin.so +0 -0
- package/bin/_internal/click-8.3.2.dist-info/RECORD +0 -40
- package/bin/_internal/liblzma.5.dylib +0 -0
- package/bin/_internal/libmpdec.4.dylib +0 -0
- package/bin/_internal/libzstd.1.dylib +0 -0
- package/bin/_internal/lxml/_elementpath.cpython-314-darwin.so +0 -0
- package/bin/_internal/lxml/builder.cpython-314-darwin.so +0 -0
- package/bin/_internal/lxml/html/_difflib.cpython-314-darwin.so +0 -0
- package/bin/_internal/lxml/html/diff.cpython-314-darwin.so +0 -0
- package/bin/_internal/lxml/sax.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_asyncio.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_codecs_iso2022.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_ctypes.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_decimal.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_elementtree.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_hashlib.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_hmac.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_interpreters.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_json.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_lzma.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_multibytecodec.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_pickle.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_socket.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_ssl.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_struct.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_zstd.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/array.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/math.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/mmap.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/pyexpat.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/readline.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/unicodedata.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/zlib.cpython-314-darwin.so +0 -0
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/INSTALLER +0 -1
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA +0 -133
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/RECORD +0 -21
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/REQUESTED +0 -0
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/licenses/LICENSE +0 -73
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/top_level.txt +0 -1
- /package/bin/_internal/{click-8.3.2.dist-info → click-8.4.2.dist-info}/INSTALLER +0 -0
- /package/bin/_internal/{click-8.3.2.dist-info → click-8.4.2.dist-info}/WHEEL +0 -0
- /package/bin/_internal/{click-8.3.2.dist-info → click-8.4.2.dist-info}/licenses/LICENSE.txt +0 -0
- /package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/INSTALLER +0 -0
- /package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/licenses/LICENSE +0 -0
- /package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/licenses/LICENSE.APACHE +0 -0
- /package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/licenses/LICENSE.BSD +0 -0
- /package/bin/_internal/{setuptools/_vendor/importlib_metadata-8.7.1.dist-info → exchangelib-5.6.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Implements an Exchange user object and access types. Exchange provides two different ways of granting access for a
|
|
3
|
+
login to a specific account. Impersonation is used mainly for service accounts that connect via EWS. Delegate is used
|
|
4
|
+
for ad-hoc access e.g. granted manually by the user.
|
|
5
|
+
See https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/impersonation-and-ews-in-exchange
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import abc
|
|
9
|
+
import logging
|
|
10
|
+
from threading import RLock
|
|
11
|
+
|
|
12
|
+
import oauthlib.oauth2
|
|
13
|
+
from cached_property import threaded_cached_property
|
|
14
|
+
|
|
15
|
+
from .errors import InvalidTypeError
|
|
16
|
+
|
|
17
|
+
log = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
IMPERSONATION = "impersonation"
|
|
20
|
+
DELEGATE = "delegate"
|
|
21
|
+
ACCESS_TYPES = (IMPERSONATION, DELEGATE)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class BaseCredentials(metaclass=abc.ABCMeta):
|
|
25
|
+
"""Base class for credential storage."""
|
|
26
|
+
|
|
27
|
+
def __eq__(self, other):
|
|
28
|
+
return all(getattr(self, k) == getattr(other, k) for k in self.__dict__)
|
|
29
|
+
|
|
30
|
+
def __hash__(self):
|
|
31
|
+
return hash(tuple((getattr(self, k) for k in self.__dict__)))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class Credentials(BaseCredentials):
|
|
35
|
+
r"""Keeps login info the way Exchange likes it.
|
|
36
|
+
|
|
37
|
+
Usernames for authentication are of one of these forms:
|
|
38
|
+
* PrimarySMTPAddress
|
|
39
|
+
* WINDOMAIN\username
|
|
40
|
+
* User Principal Name (UPN)
|
|
41
|
+
password: Clear-text password
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
EMAIL = "email"
|
|
45
|
+
DOMAIN = "domain"
|
|
46
|
+
UPN = "upn"
|
|
47
|
+
|
|
48
|
+
def __init__(self, username, password):
|
|
49
|
+
super().__init__()
|
|
50
|
+
if username.count("@") == 1:
|
|
51
|
+
self.type = self.EMAIL
|
|
52
|
+
elif username.count("\\") == 1:
|
|
53
|
+
self.type = self.DOMAIN
|
|
54
|
+
else:
|
|
55
|
+
self.type = self.UPN
|
|
56
|
+
self.username = username
|
|
57
|
+
self.password = password
|
|
58
|
+
|
|
59
|
+
def __repr__(self):
|
|
60
|
+
return self.__class__.__name__ + repr((self.username, "********"))
|
|
61
|
+
|
|
62
|
+
def __str__(self):
|
|
63
|
+
return self.username
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class BaseOAuth2Credentials(BaseCredentials):
|
|
67
|
+
"""Base class for all classes that implement OAuth 2.0 authentication"""
|
|
68
|
+
|
|
69
|
+
def __init__(self, client_id, client_secret, tenant_id=None, identity=None, access_token=None):
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
:param client_id: ID of an authorized OAuth application, required for automatic token fetching and refreshing
|
|
73
|
+
:param client_secret: Secret associated with the OAuth application
|
|
74
|
+
:param tenant_id: Microsoft tenant ID of the account to access
|
|
75
|
+
:param identity: An Identity object representing the account that these credentials are connected to.
|
|
76
|
+
:param access_token: Previously-obtained access token, as a dict or an oauthlib.oauth2.OAuth2Token
|
|
77
|
+
"""
|
|
78
|
+
super().__init__()
|
|
79
|
+
self.client_id = client_id
|
|
80
|
+
self.client_secret = client_secret
|
|
81
|
+
self.tenant_id = tenant_id
|
|
82
|
+
self.identity = identity
|
|
83
|
+
self.access_token = access_token
|
|
84
|
+
|
|
85
|
+
self._lock = RLock()
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def lock(self):
|
|
89
|
+
return self._lock
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def access_token(self):
|
|
93
|
+
return self._access_token
|
|
94
|
+
|
|
95
|
+
@access_token.setter
|
|
96
|
+
def access_token(self, access_token):
|
|
97
|
+
if access_token is not None and not isinstance(access_token, dict):
|
|
98
|
+
raise InvalidTypeError("access_token", access_token, oauthlib.oauth2.OAuth2Token)
|
|
99
|
+
self._access_token = access_token
|
|
100
|
+
|
|
101
|
+
def refresh(self, session):
|
|
102
|
+
"""Obtain a new set of valid credentials. This is intended to support OAuth token refreshing, which can
|
|
103
|
+
happen in long-running applications or those that cache access tokens and so might start with a token close to
|
|
104
|
+
expiration.
|
|
105
|
+
|
|
106
|
+
:param session: requests session asking for refreshed credentials
|
|
107
|
+
:return:
|
|
108
|
+
"""
|
|
109
|
+
# Creating a new session gets a new access token, so there's no work here to refresh the credentials.
|
|
110
|
+
|
|
111
|
+
def on_token_auto_refreshed(self, access_token):
|
|
112
|
+
"""Set the access_token. Called after the access token is refreshed (requests-oauthlib can automatically
|
|
113
|
+
refresh tokens if given an OAuth client ID and secret, so this is how our copy of the token stays up-to-date).
|
|
114
|
+
Applications that cache access tokens can override this to store the new token - just remember to call the
|
|
115
|
+
super() method.
|
|
116
|
+
|
|
117
|
+
:param access_token: New token obtained by refreshing
|
|
118
|
+
"""
|
|
119
|
+
# Ensure we don't update the object in the middle of a new session being created, which could cause a race.
|
|
120
|
+
with self.lock:
|
|
121
|
+
log.debug("%s auth token for %s", "Refreshing" if self.access_token else "Setting", self.client_id)
|
|
122
|
+
self.access_token = access_token
|
|
123
|
+
|
|
124
|
+
def sig(self):
|
|
125
|
+
# Like hash(self), but pulls in the access token. Protocol.refresh_credentials() uses this to find out
|
|
126
|
+
# if the access_token needs to be refreshed.
|
|
127
|
+
res = []
|
|
128
|
+
for k in self.__dict__:
|
|
129
|
+
if k in ("_lock", "identity"):
|
|
130
|
+
continue
|
|
131
|
+
if k == "_access_token":
|
|
132
|
+
res.append(self.access_token["access_token"] if self.access_token else None)
|
|
133
|
+
continue
|
|
134
|
+
res.append(getattr(self, k))
|
|
135
|
+
return hash(tuple(res))
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def token_url(self):
|
|
139
|
+
"""The URL to request tokens from"""
|
|
140
|
+
# We may not know (or need) the Microsoft tenant ID. If not, use common/ to let Microsoft select the appropriate
|
|
141
|
+
# tenant for the provided authorization code or refresh token.
|
|
142
|
+
return f"https://login.microsoftonline.com/{self.tenant_id or 'common'}/oauth2/v2.0/token" # nosec
|
|
143
|
+
|
|
144
|
+
@property
|
|
145
|
+
def scope(self):
|
|
146
|
+
"""The scope we ask for the token to have"""
|
|
147
|
+
return ["https://outlook.office365.com/.default"]
|
|
148
|
+
|
|
149
|
+
def session_params(self):
|
|
150
|
+
"""Extra parameters to use when creating the session"""
|
|
151
|
+
res = {"token": self.access_token} # Token may be None
|
|
152
|
+
if self.client_id and self.client_secret:
|
|
153
|
+
# If we're given a client ID and secret, we have enough to refresh access tokens ourselves. In other
|
|
154
|
+
# cases the session will raise TokenExpiredError, and we'll need to ask the calling application to
|
|
155
|
+
# refresh the token (that covers cases where the caller doesn't have access to the client secret but
|
|
156
|
+
# is working with a service that can provide it refreshed tokens on a limited basis).
|
|
157
|
+
res.update(
|
|
158
|
+
{
|
|
159
|
+
"auto_refresh_kwargs": {
|
|
160
|
+
"client_id": self.client_id,
|
|
161
|
+
"client_secret": self.client_secret,
|
|
162
|
+
},
|
|
163
|
+
"auto_refresh_url": self.token_url,
|
|
164
|
+
"token_updater": self.on_token_auto_refreshed,
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
return res
|
|
168
|
+
|
|
169
|
+
@staticmethod
|
|
170
|
+
def token_params():
|
|
171
|
+
"""Extra parameters when requesting the token"""
|
|
172
|
+
return {"include_client_id": True}
|
|
173
|
+
|
|
174
|
+
@threaded_cached_property
|
|
175
|
+
@abc.abstractmethod
|
|
176
|
+
def client(self):
|
|
177
|
+
"""The client implementation to use for this credential class"""
|
|
178
|
+
|
|
179
|
+
def __eq__(self, other):
|
|
180
|
+
return all(getattr(self, k) == getattr(other, k) for k in self.__dict__ if k != "_lock")
|
|
181
|
+
|
|
182
|
+
def __hash__(self):
|
|
183
|
+
# 'access_token' may be refreshed once in a while. This should not affect the hash signature.
|
|
184
|
+
# 'identity' is just informational and should also not affect the hash signature.
|
|
185
|
+
return hash(tuple(getattr(self, k) for k in self.__dict__ if k not in ("_lock", "identity", "_access_token")))
|
|
186
|
+
|
|
187
|
+
def __str__(self):
|
|
188
|
+
return self.client_id
|
|
189
|
+
|
|
190
|
+
def __repr__(self):
|
|
191
|
+
return self.__class__.__name__ + repr((self.client_id, "********"))
|
|
192
|
+
|
|
193
|
+
def __getstate__(self):
|
|
194
|
+
# The lock cannot be pickled
|
|
195
|
+
state = self.__dict__.copy()
|
|
196
|
+
del state["_lock"]
|
|
197
|
+
return state
|
|
198
|
+
|
|
199
|
+
def __setstate__(self, state):
|
|
200
|
+
# Restore the lock
|
|
201
|
+
self.__dict__.update(state)
|
|
202
|
+
self._lock = RLock()
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
class OAuth2Credentials(BaseOAuth2Credentials):
|
|
206
|
+
"""Login info for OAuth 2.0 client credentials authentication, as well as a base for other OAuth 2.0 grant types.
|
|
207
|
+
|
|
208
|
+
This is primarily useful for in-house applications accessing data from a single Microsoft account. For applications
|
|
209
|
+
that will access multiple tenants' data, the client credentials flow does not give the application enough
|
|
210
|
+
information to restrict end users' access to the appropriate account. Use OAuth2AuthorizationCodeCredentials and
|
|
211
|
+
the associated auth code grant type for multi-tenant applications.
|
|
212
|
+
"""
|
|
213
|
+
|
|
214
|
+
@threaded_cached_property
|
|
215
|
+
def client(self):
|
|
216
|
+
return oauthlib.oauth2.BackendApplicationClient(client_id=self.client_id)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class OAuth2LegacyCredentials(OAuth2Credentials):
|
|
220
|
+
"""Login info for OAuth 2.0 authentication using delegated permissions and application permissions.
|
|
221
|
+
|
|
222
|
+
This requires the app to acquire username and password from the user and pass that when requesting authentication
|
|
223
|
+
tokens for the given user. This allows the app to act as the signed-in user.
|
|
224
|
+
"""
|
|
225
|
+
|
|
226
|
+
def __init__(self, username, password, **kwargs):
|
|
227
|
+
"""
|
|
228
|
+
:param username: The username of the user to act as
|
|
229
|
+
:param password: The password of the user to act as
|
|
230
|
+
"""
|
|
231
|
+
super().__init__(**kwargs)
|
|
232
|
+
self.username = username
|
|
233
|
+
self.password = password
|
|
234
|
+
|
|
235
|
+
def token_params(self):
|
|
236
|
+
res = super().token_params()
|
|
237
|
+
res["username"] = self.username
|
|
238
|
+
res["password"] = self.password
|
|
239
|
+
return res
|
|
240
|
+
|
|
241
|
+
@threaded_cached_property
|
|
242
|
+
def client(self):
|
|
243
|
+
return oauthlib.oauth2.LegacyApplicationClient(client_id=self.client_id)
|
|
244
|
+
|
|
245
|
+
@property
|
|
246
|
+
def scope(self):
|
|
247
|
+
return ["https://outlook.office365.com/EWS.AccessAsUser.All"]
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class OAuth2AuthorizationCodeCredentials(BaseOAuth2Credentials):
|
|
251
|
+
"""Login info for OAuth 2.0 authentication using the authorization code grant type. This can be used in one of
|
|
252
|
+
several ways:
|
|
253
|
+
* Given an authorization code, client ID, and client secret, fetch a token ourselves and refresh it as needed if
|
|
254
|
+
supplied with a refresh token.
|
|
255
|
+
* Given an existing access token, client ID, and client secret, use the access token until it expires and then
|
|
256
|
+
refresh it as needed.
|
|
257
|
+
* Given only an existing access token, use it until it expires. This can be used to let the calling application
|
|
258
|
+
refresh tokens itself by subclassing and implementing refresh().
|
|
259
|
+
|
|
260
|
+
Unlike the base (client credentials) grant, authorization code credentials don't require a Microsoft tenant ID
|
|
261
|
+
because each access token (and the authorization code used to get the access token) is restricted to a single
|
|
262
|
+
tenant.
|
|
263
|
+
"""
|
|
264
|
+
|
|
265
|
+
def __init__(self, authorization_code=None, **kwargs):
|
|
266
|
+
"""
|
|
267
|
+
|
|
268
|
+
:param authorization_code: Code obtained when authorizing the application to access an account. In combination
|
|
269
|
+
with client_id and client_secret, will be used to obtain an access token.
|
|
270
|
+
"""
|
|
271
|
+
for attr in ("client_id", "client_secret"):
|
|
272
|
+
# Allow omitting these kwargs
|
|
273
|
+
kwargs[attr] = kwargs.pop(attr, None)
|
|
274
|
+
super().__init__(**kwargs)
|
|
275
|
+
self.authorization_code = authorization_code
|
|
276
|
+
|
|
277
|
+
@property
|
|
278
|
+
def scope(self):
|
|
279
|
+
res = super().scope
|
|
280
|
+
res.append("offline_access")
|
|
281
|
+
return res
|
|
282
|
+
|
|
283
|
+
def token_params(self):
|
|
284
|
+
res = super().token_params()
|
|
285
|
+
res["code"] = self.authorization_code # Auth code may be None
|
|
286
|
+
self.authorization_code = None # We can only use the code once
|
|
287
|
+
return res
|
|
288
|
+
|
|
289
|
+
@threaded_cached_property
|
|
290
|
+
def client(self):
|
|
291
|
+
return oauthlib.oauth2.WebApplicationClient(client_id=self.client_id)
|
|
292
|
+
|
|
293
|
+
def __repr__(self):
|
|
294
|
+
return self.__class__.__name__ + repr(
|
|
295
|
+
(self.client_id, "[client_secret]", "[authorization_code]", "[access_token]")
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
def __str__(self):
|
|
299
|
+
client_id = self.client_id
|
|
300
|
+
credential = (
|
|
301
|
+
"[access_token]"
|
|
302
|
+
if self.access_token is not None
|
|
303
|
+
else ("[authorization_code]" if self.authorization_code is not None else None)
|
|
304
|
+
)
|
|
305
|
+
description = " ".join(filter(None, [client_id, credential]))
|
|
306
|
+
return description or "[underspecified credentials]"
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
class O365InteractiveCredentials(OAuth2AuthorizationCodeCredentials):
|
|
310
|
+
AUTHORITY = "https://login.microsoftonline.com/organizations"
|
|
311
|
+
SCOPE = ["EWS.AccessAsUser.All"]
|
|
312
|
+
|
|
313
|
+
def __init__(self, client_id, username):
|
|
314
|
+
import msal
|
|
315
|
+
|
|
316
|
+
app = msal.PublicClientApplication(client_id=client_id, authority=self.AUTHORITY)
|
|
317
|
+
print("A local browser window will be open for you to sign in. CTRL+C to cancel.")
|
|
318
|
+
access_token = app.acquire_token_interactive(self.SCOPE, login_hint=username)
|
|
319
|
+
super().__init__(access_token=access_token)
|