File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1- { "engineHash" : " 4148197 " , "specHash" : " c303afc" , "version" : " 1.13.0" }
1+ { "engineHash" : " e5d612a " , "specHash" : " c303afc" , "version" : " 1.13.0" }
Original file line number Diff line number Diff line change @@ -330,6 +330,10 @@ def get_rsa_private_key(
330330 private_key : str ,
331331 passphrase : str ,
332332) -> Any :
333+ if default_backend is None or serialization is None :
334+ raise ImportError (
335+ 'Missing `cryptography` dependency. `cryptography` library is required to create JWT assertion.'
336+ )
333337 encoded_private_key = encode_str_ascii_or_raise (private_key )
334338 encoded_passphrase = encode_str_ascii_or_raise (passphrase )
335339
@@ -341,6 +345,10 @@ def get_rsa_private_key(
341345
342346
343347def create_jwt_assertion (claims : dict , key : JwtKey , options : JwtSignOptions ) -> str :
348+ if jwt is None :
349+ raise ImportError (
350+ 'Missing `PyJWT` dependency. `PyJWT` library is required to create JWT assertion.'
351+ )
344352 return jwt .encode (
345353 {
346354 'iss' : options .issuer ,
You can’t perform that action at this time.
0 commit comments