raise fmterror("no identified user even after successful authentication")
self.userid = uid
- def auth_token(self, user, conv=None):
+ def auth_token(self, user, *, conv=None):
if conv is None:
conv = auth.default()
try:
raise fmterror("unexpected token challenge: type: " + data.get("type"))
self._postlogin()
- def auth_bankid(self, user, conv=None):
+ def auth_bankid(self, *, conv=None):
if conv is None:
conv = auth.default()
try:
data = self._jreq(apicall, "cross-channel/customer-security/authentication/v1/bankid/authentication", data={
- "userId": user,
"idMethod": "MOBILE_BANKID",
"generateEasyLogin": False,
"mockedAuthencation": False,
else:
sys.stderr.write("netbank: %s: unknown authentication type\n" % (args[1]))
sys.exit(1)
- if len(args) < 3:
- sys.stderr.write("usage: login bankid USER-ID\n")
- sys.exit(1)
with auth.ttyconv() as conv:
try:
- authfun(args[2], conv)
+ authfun(*args[2:], conv=conv)
except auth.autherror as err:
sys.stderr.write("netbank: authentication failed: %s\n" % err)
sys.exit(1)