from typing import Callable, Optional, final
__all__ = [
'AuthServer',
'BuildClientError',
'ClientCredentials',
'ExternallyManaged',
'LoadClientError',
'OAuthSession',
'QCSClient',
'RefreshToken',
]
class LoadClientError(RuntimeError):
...
class BuildClientError(RuntimeError):
...
@final
class QCSClient:
def __new__(
cls,
oauth_session: Optional[OAuthSession] = None,
api_url: Optional[str] = None,
grpc_api_url: Optional[str] = None,
quilc_url: Optional[str] = None,
qvm_url: Optional[str] = None,
) -> "QCSClient":
...
@staticmethod
def load(
profile_name: Optional[str] = None,
) -> "QCSClient":
...
@property
def api_url(self) -> str:
...
@property
def grpc_api_url(self) -> str:
...
@property
def quilc_url(self) -> str:
...
@property
def qvm_url(self) -> str:
...
@property
def oauth_session(self) -> OAuthSession:
@final
class OAuthSession:
def __new__(
cls,
grant_payload: RefreshToken | ClientCredentials | ExternallyManaged,
auth_server: AuthServer,
access_token: str | None = None,
) -> OAuthSession: ...
@property
def access_token(self) -> str:
@property
def auth_server(self) -> AuthServer:
@property
def payload(self) -> RefreshToken | ClientCredentials:
def request_access_token(self) -> str:
async def request_access_token_async(self) -> str:
def validate(self) -> str:
@final
class AuthServer:
def __new__(cls, client_id: str, issuer: str) -> AuthServer: ...
@staticmethod
def default() -> AuthServer:
@property
def client_id(self) -> str:
@property
def issuer(self) -> str:
@final
class RefreshToken:
def __new__(cls, refresh_token: str) -> RefreshToken: ...
@property
def refresh_token(self) -> str:
@refresh_token.setter
def refresh_token(self, refresh_token: str):
@final
class ClientCredentials:
def __new__(cls, client_id: str, client_secret: str) -> ClientCredentials: ...
@property
def client_id(self) -> str:
@property
def client_secret(self) -> str:
@final
class ExternallyManaged:
def __new__(
cls, refresh_function: Callable[[AuthServer], str]
) -> ExternallyManaged: