Skip to content

Commit 11cdc9a

Browse files
committed
Pull out sigalg and look it up once
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 4360985 commit 11cdc9a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/saml2/entity.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,9 @@ def apply_binding(self, binding, msg_str, destination="", relay_state="",
225225
info["method"] = "POST"
226226
elif binding == BINDING_HTTP_REDIRECT:
227227
logger.info("HTTP REDIRECT")
228-
if sign and kwargs.get('sigalg', ''):
229-
signer = self.sec.sec_backend.get_signer(kwargs['sigalg'])
228+
sigalg = kwargs.get("sigalg")
229+
if sign and sigalg:
230+
signer = self.sec.sec_backend.get_signer(sigalg)
230231
else:
231232
signer = None
232233
info = self.use_http_get(msg_str, destination, relay_state, typ,

0 commit comments

Comments
 (0)