From dbc6c2474b374d55872615926f3418d026a4d69d Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Fri, 25 Mar 2022 19:58:17 +0100 Subject: [PATCH] Issue #187/196 `openeo.connect` support auto-authentication from config --- openeo/rest/connection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openeo/rest/connection.py b/openeo/rest/connection.py index f24ec0492..3f5b813bf 100644 --- a/openeo/rest/connection.py +++ b/openeo/rest/connection.py @@ -1160,6 +1160,8 @@ def connect( if not url: raise OpenEoClientException("No back-end URL given or known to connect to.") connection = Connection(url, session=session, default_timeout=default_timeout) + + auth_type = auth_type or get_config().get("connection.auto_authenticate.type") auth_type = auth_type.lower() if isinstance(auth_type, str) else auth_type if auth_type in {None, 'null', 'none'}: pass