@@ -28,13 +28,13 @@ def check_value(self, claim_name: str, value: Any) -> None:
28
28
option = self .options .get (claim_name )
29
29
if not option :
30
30
return
31
-
31
+
32
32
allow_blank = option .get ("allow_blank" )
33
33
if not allow_blank and value in (None , "" , [], {}):
34
34
raise InvalidClaimError (claim_name )
35
35
36
36
option_values = option .get ("values" )
37
-
37
+
38
38
if option_values is None :
39
39
option_value = option .get ("value" )
40
40
if option_value is not None :
@@ -72,41 +72,6 @@ def __init__(self, now: int | None = None, leeway: int = 0, **kwargs: ClaimsOpti
72
72
self .leeway = leeway
73
73
super ().__init__ (** kwargs )
74
74
75
- def validate_aud (self , value : str | list [str ]) -> None :
76
- """The "aud" (audience) claim identifies the recipients that the JWT is
77
- intended for. Each principal intended to process the JWT MUST
78
- identify itself with a value in the audience claim. If the principal
79
- processing the claim does not identify itself with a value in the
80
- "aud" claim when this claim is present, then the JWT MUST be
81
- rejected. In the general case, the "aud" value is an array of
82
- case-sensitive strings, each containing a StringOrURI value. In the
83
- special case when the JWT has one audience, the "aud" value MAY be a
84
- single case-sensitive string containing a StringOrURI value. The
85
- interpretation of audience values is generally application specific.
86
- Use of this claim is OPTIONAL.
87
- """
88
- option = self .options .get ("aud" )
89
- if not option :
90
- return
91
-
92
- option_values = option .get ("values" )
93
-
94
- if option_values is None :
95
- option_value = option .get ("value" )
96
- if option_value :
97
- option_values = [option_value ]
98
-
99
- if not option_values :
100
- return
101
-
102
- if isinstance (value , list ):
103
- aud_list = value
104
- else :
105
- aud_list = [value ]
106
-
107
- if not any (v in aud_list for v in option_values ):
108
- raise InvalidClaimError ("aud" )
109
-
110
75
def validate_exp (self , value : int ) -> None :
111
76
"""The "exp" (expiration time) claim identifies the expiration time on
112
77
or after which the JWT MUST NOT be accepted for processing. The
0 commit comments