weaviate.auth¶
Authentication class definitions.
- class weaviate.auth.AuthBearerToken(access_token: str, expires_in: int = 60, refresh_token: Optional[str] = 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: Optional[str] = None¶
- class weaviate.auth.AuthClientCredentials(client_secret: str, scope: Optional[str] = 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.
- client_secret: str¶
- scope: Optional[str] = None¶
- class weaviate.auth.AuthClientPassword(username: str, password: str, scope: Optional[str] = 'offline_access')¶
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.
- password: str¶
- scope: Optional[str] = 'offline_access'¶
- username: str¶