From b20067fd5070a36a78c8a90be4f0de0c9723f437 Mon Sep 17 00:00:00 2001
From: Mart van Santen <mart@greenhost.nl>
Date: Tue, 21 Dec 2021 06:55:45 +0100
Subject: [PATCH] Reorder arguments

---
 login/app.py    | 2 +-
 login/kratos.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/login/app.py b/login/app.py
index 90e60a4..546963e 100644
--- a/login/app.py
+++ b/login/app.py
@@ -551,7 +551,7 @@ def consent():
             role = role_obj.role
 
     # Get claims for this user, provided the current app
-    claims = user.get_claims(app_name, None, role)
+    claims = user.get_claims(app_name, role)
 
     # pylint: disable=fixme
     # TODO: Need to implement checking claims here, once the backend for that is
diff --git a/login/kratos.py b/login/kratos.py
index 5636841..0f473ad 100644
--- a/login/kratos.py
+++ b/login/kratos.py
@@ -325,7 +325,7 @@ class KratosUser():
     # Pylint complains about app not used. That is correct, but we will use that
     # in the future. Ignore this error
     # pylint: disable=unused-argument
-    def get_claims(self, app, mapping = None, role) -> Dict[str, Dict[str, str]]:
+    def get_claims(self, app, role, mapping = None) -> Dict[str, Dict[str, str]]:
         """Create openID Connect token
         Use the userdata stored in the user object to create an OpenID Connect token.
         The token returned by this function can be passed to Hydra,
-- 
GitLab