cmem_client.models.credentials¤
Models for the OAuth2 credentials.
These models carry the credentials of an OAuth2 flow as a validated object, instead of
a set of loose strings. The marketplace operations of client.marketplace take one
of them to authenticate against a marketplace server. The secrets are held as
SecretStr, so they are masked when a model is printed or logged.
Classes:
- BaseCredentials – Base class for OAuth2 credential types
- ClientCredentials – The client credentials class
- PasswordCredentials – The password credentials class
BaseCredentials¤
Bases: Model
Base class for OAuth2 credential types
Attributes:
- client_id (
str) – Keycloak client the credentials authenticate with. The default suits the password flow; the client credentials flow needs the ID of the service account instead.
client_id¤
model_config¤
ClientCredentials¤
Bases: BaseCredentials
The client credentials class
Attributes:
- client_secret (
SecretStr) – Secret of the Keycloak client named byclient_id.
client_id¤
client_secret¤
model_config¤
PasswordCredentials¤
Bases: BaseCredentials
The password credentials class
Attributes: