File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -402,3 +402,17 @@ def test_jti_invalid(self, key):
402402 token = jwt .encode (claims , key )
403403 with pytest .raises (JWTError ):
404404 jwt .decode (token , key )
405+
406+ def test_unverified_claims_string (self ):
407+ token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.aW52YWxpZCBjbGFpbQ.iOJ5SiNfaNO_pa2J4Umtb3b3zmk5C18-mhTCVNsjnck'
408+ with pytest .raises (JWTError ):
409+ jwt .get_unverified_claims (token )
410+
411+ def test_unverified_claims_list (self ):
412+ token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.WyJpbnZhbGlkIiwgImNsYWltcyJd.nZvw_Rt1FfUPb5OiVbrSYZGtWSE5c-gdJ6nQnTTBkYo'
413+ with pytest .raises (JWTError ):
414+ jwt .get_unverified_claims (token )
415+
416+ def test_unverified_claims_object (self , claims , key ):
417+ token = jwt .encode (claims , key )
418+ assert jwt .get_unverified_claims (token ) == claims
You can’t perform that action at this time.
0 commit comments