MCPcopy
hub / github.com/authlib/authlib / _validate_private_headers

Method _validate_private_headers

authlib/jose/rfc7515/jws.py:279–288  ·  view source on GitHub ↗
(self, header)

Source from the content-addressed store, hash-verified

277 return algorithm, key
278
279 def _validate_private_headers(self, header):
280 # only validate private headers when developers set
281 # private headers explicitly
282 if self._private_headers is not None:
283 names = self.REGISTERED_HEADER_PARAMETER_NAMES.copy()
284 names = names.union(self._private_headers)
285
286 for k in header:
287 if k not in names:
288 raise InvalidHeaderParameterNameError(k)
289
290 def _reject_unprotected_crit(self, unprotected_header):
291 """Reject 'crit' when found in the unprotected header (RFC 7515 §4.1.11)."""

Callers 2

serialize_compactMethod · 0.95
_signMethod · 0.95

Tested by

no test coverage detected