()
| 54 | """ |
| 55 | |
| 56 | def get_token() -> str: |
| 57 | try: |
| 58 | with open(token_file_path, "r") as f: |
| 59 | token = f.read().strip() |
| 60 | if not token: |
| 61 | raise SubjectTokenProviderError(f"The token file at {token_file_path} is empty.") |
| 62 | return token |
| 63 | except Exception as e: |
| 64 | raise SubjectTokenProviderError(f"Failed to read the token file at {token_file_path}: {e}") from e |
| 65 | |
| 66 | return {"token_type": "jwt", "get_token": get_token} |
| 67 |
nothing calls this directly
no test coverage detected