clean_authorization#
- gafaelfawr.auth.clean_authorization(headers)#
Remove Gafaelfawr tokens from
Authorizationheaders.- Parameters:
headers (
list[str]) – TheAuthorizationheaders of an incoming request, as a list (allowing for the case that the incoming request had multiple headers namedAuthorization).- Returns:
Any remaining
Authorizationheaders after removing headers containing Gafaelfawr tokens.- Return type:
Notes
We don’t drop all
Authorizationbecause Gafaelfawr may be doing stripping for anonymous routes that may be in front of services doing their own authentication, possibly with authentication types we don’t recognize.