This class is used to authenticate with a single constant token.
| 154 | |
| 155 | |
| 156 | class Token(Auth): |
| 157 | """ |
| 158 | This class is used to authenticate with a single constant token. |
| 159 | """ |
| 160 | |
| 161 | def __init__(self, token: str): |
| 162 | assert isinstance(token, str) |
| 163 | assert len(token) > 0 |
| 164 | self._token = token |
| 165 | |
| 166 | @property |
| 167 | def token_type(self) -> str: |
| 168 | return "token" |
| 169 | |
| 170 | @property |
| 171 | def token(self) -> str: |
| 172 | return self._token |
| 173 | |
| 174 | @property |
| 175 | def _masked_token(self) -> str: |
| 176 | return "token (oauth token removed)" |
| 177 | |
| 178 | |
| 179 | class JWT(Auth, ABC): |
no outgoing calls
no test coverage detected
searching dependent graphs…