Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
Fix Forge creation in anonymous mode still attempting login to auth-only mdf service.
  • Loading branch information
jgaff committed Feb 16, 2018
1 parent d6ade6c commit 9e8102b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mdf_forge/forge.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class Forge:
index is the Globus Search index to be used.
"""
__default_index = "mdf"
__services = ["mdf", "transfer", "search"]
__auth_services = ["mdf", "transfer", "search"]
__anon_services = ["search"]
__app_name = "MDF_Forge"

def __init__(self, index=__default_index, local_ep=None, anonymous=False, **kwargs):
Expand All @@ -49,11 +50,11 @@ def __init__(self, index=__default_index, local_ep=None, anonymous=False, **kwar
self.index = index
self.local_ep = local_ep

services = kwargs.get('services', self.__services)

if self.__anonymous:
services = kwargs.get('services', self.__anon_services)
clients = toolbox.anonymous_login(services)
else:
services = kwargs.get('services', self.__auth_services)
clients = toolbox.login(credentials={
"app_name": self.__app_name,
"services": services,
Expand Down

0 comments on commit 9e8102b

Please sign in to comment.