Create a gRPC stub that injects a Bearer token.
(token: str)
| 150 | |
| 151 | |
| 152 | def _stub_with_token(token: str) -> tuple[openshell_pb2_grpc.OpenShellStub, list[tuple[str, str]]]: |
| 153 | """Create a gRPC stub that injects a Bearer token.""" |
| 154 | channel = _grpc_channel() |
| 155 | return openshell_pb2_grpc.OpenShellStub(channel), [ |
| 156 | ("authorization", f"Bearer {token}") |
| 157 | ] |
| 158 | |
| 159 | |
| 160 | # ── RBAC Tests ──────────────────────────────────────────────────────── |
no test coverage detected