weaviate.auth
Authentication class definitions.
- class weaviate.auth.AuthApiKey(api_key: str)
Bases:
object
Using the given API key to authenticate with weaviate.
- api_key: str
- class weaviate.auth.AuthBearerToken(access_token: str, expires_in: int = 60, refresh_token: str | None = None)
Bases:
object
Using a preexisting bearer/access token for authentication.
The expiration time of access tokens is given in seconds.
Only the access token is required. However, when no refresh token is given, the authentication will expire once the lifetime of the access token is up.
- access_token: str
- expires_in: int = 60
- refresh_token: str | None = None
- class weaviate.auth.AuthClientCredentials(client_secret: str, scope: str | List[str] | None = None)
Bases:
object
Authenticate for the Client Credential flow using client secrets.
Acquire the client secret from your identify provider and set the appropriate scope. The client includes hardcoded scopes for Azure, otherwise it needs to be supplied. Scopes can be given as:
List of strings: [“scope1”, “scope2”]
space separated string: “scope1 scope2”
- client_secret: str
- scope: str | List[str] | None = None
- class weaviate.auth.AuthClientPassword(username: str, password: str, scope: str | ~typing.List[str] | None = <factory>)
Bases:
object
Using username and password for authentication with Resource Owner Password flow.
For some providers the scope needs to contain “offline_access” (and “openid” which is automatically added) to return a refresh token. Without a refresh token the authentication will expire once the lifetime of the access token is up. Scopes can be given as:
List of strings: [“scope1”, “scope2”]
space separated string: “scope1 scope2”
- password: str
- scope: str | List[str] | None
- username: str