Skip to content

Commit 8c4b5f4

Browse files
committed
Auth with emails instead of usernames
1 parent aaba3a9 commit 8c4b5f4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

servicex/servicex_adaptor.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@
2020
servicex_status_poll_time = 5.0
2121

2222

23+
def servicex_adaptor_factory(c: ConfigView):
24+
# It is an error if this is not specified somewhere.
25+
endpoint = c['api_endpoint']['endpoint'].as_str_expanded()
26+
27+
# We can default these to "None"
28+
email = c['api_endpoint']['email'].get(str) if 'email' in c['api_endpoint'] else None
29+
password = c['api_endpoint']['password'].get(str) if 'password' in c['api_endpoint'] else None
30+
return ServiceXAdaptor(endpoint, email, password)
31+
32+
2333
# Low level routines for interacting with a ServiceX instance via the WebAPI
2434
class ServiceXAdaptor:
2535
def __init__(self, endpoint, email=None, password=None):

0 commit comments

Comments
 (0)