Skip to content

Commit 6e39731

Browse files
authored
Merge pull request #58 from jvstme/service-optional
Fix token auth when `service` is missing
2 parents 9e733e9 + 296e008 commit 6e39731

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dxf/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ def authenticate(self,
302302
scope = ''
303303
url_parts = list(urlparse.urlparse(info['realm']))
304304
query = urlparse.parse_qsl(url_parts[4])
305-
query.append(('service', info['service']))
305+
if 'service' in info:
306+
query.append(('service', info['service']))
306307
query.extend(('scope', s) for s in scope.split())
307308
url_parts[4] = urlencode(query, True)
308309
url_parts[0] = 'https'

0 commit comments

Comments
 (0)