Skip to content

Commit d01ea8a

Browse files
authored
Merge pull request #118 from gtmanfred/develop
Fixes #116
2 parents de89d98 + bb3e1da commit d01ea8a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pepper/libpepper.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,21 @@ def wheel(self, fun, arg=None, kwarg=None, **kwargs):
441441
def _send_auth(self, path, **kwargs):
442442
return self.req(path, kwargs)
443443

444-
def login(self, **kwargs):
444+
def login(self, username=None, password=None, eauth=None, **kwargs):
445445
'''
446446
Authenticate with salt-api and return the user permissions and
447447
authentication token or an empty dict
448448
449449
'''
450+
kwargs.update(
451+
dict(
452+
(key, locals()[key]) for key in (
453+
'username',
454+
'password',
455+
'eauth'
456+
) if locals()[key] is not None
457+
)
458+
)
450459
self.auth = self._send_auth('/login', **kwargs).get('return', [{}])[0]
451460
return self.auth
452461

0 commit comments

Comments
 (0)