(headers)
| 118 | |
| 119 | |
| 120 | def fixAuthorizationHeader(headers): |
| 121 | if "Authorization" in headers: |
| 122 | if headers["Authorization"].endswith("ZmFrZV9sb2dpbjpmYWtlX3Bhc3N3b3Jk"): |
| 123 | # This special case is here to test the real Authorization header |
| 124 | # sent by PyGithub. It would have avoided issue https://github.com/jacquev6/PyGithub/issues/153 |
| 125 | # because we would have seen that Python 3 was not generating the same |
| 126 | # header as Python 2 |
| 127 | pass |
| 128 | elif headers["Authorization"].startswith("token "): |
| 129 | headers["Authorization"] = "token private_token_removed" |
| 130 | elif headers["Authorization"].startswith("Basic "): |
| 131 | headers["Authorization"] = "Basic login_and_password_removed" |
| 132 | elif headers["Authorization"].startswith("Bearer "): |
| 133 | headers["Authorization"] = "Bearer jwt_removed" |
| 134 | |
| 135 | |
| 136 | @dataclass |
no outgoing calls
no test coverage detected
searching dependent graphs…