secretconfig¶
AttrDict for specifying user credentials or secrets.
SecretConfig
¶
Bases: BaseModel
Simple model for handling secret in other config-models.
Source code in oteapi/models/secretconfig.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
client_id: Optional[SecretStr] = Field(None, description='Client ID for an OAUTH2 client.')
class-attribute
¶
client_secret: Optional[SecretStr] = Field(None, description='Client secret for an OAUTH2 client.')
class-attribute
¶
password: Optional[SecretStr] = Field(None, description='Password for authentication.')
class-attribute
¶
token: Optional[SecretStr] = Field(None, description='An access token for providing access and meta data to an application.')
class-attribute
¶
user: Optional[SecretStr] = Field(None, description='User name for authentication.')
class-attribute
¶
json_dumps(model, default)
¶
Alternative function for dumping exposed secrets to json when model is serialized.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
dict
|
The pydantic model to serialize. |
required |
default |
Callable[[Any], Any]
|
A pass-through to the standard |
required |
Returns:
Type | Description |
---|---|
str
|
The result of |
Source code in oteapi/models/secretconfig.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|