],
password: Annotated[
str,
- Form(),
+ Form(json_schema_extra={"format": "password"}),
Doc(
"""
`password` string. The OAuth2 spec requires the exact field name
] = None,
client_secret: Annotated[
Union[str, None],
- Form(),
+ Form(json_schema_extra={"format": "password"}),
Doc(
"""
If there's a `client_password` (and a `client_id`), they can be sent
}
),
"username": {"title": "Username", "type": "string"},
- "password": {"title": "Password", "type": "string"},
+ "password": {
+ "title": "Password",
+ "type": "string",
+ "format": "password",
+ },
"scope": {"title": "Scope", "type": "string", "default": ""},
"client_id": IsDict(
{
{
"title": "Client Secret",
"anyOf": [{"type": "string"}, {"type": "null"}],
+ "format": "password",
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
- {"title": "Client Secret", "type": "string"}
+ {
+ "title": "Client Secret",
+ "type": "string",
+ "format": "password",
+ }
),
},
},
}
),
"username": {"title": "Username", "type": "string"},
- "password": {"title": "Password", "type": "string"},
+ "password": {
+ "title": "Password",
+ "type": "string",
+ "format": "password",
+ },
"scope": {"title": "Scope", "type": "string", "default": ""},
"client_id": IsDict(
{
{
"title": "Client Secret",
"anyOf": [{"type": "string"}, {"type": "null"}],
+ "format": "password",
}
)
| IsDict(
# TODO: remove when deprecating Pydantic v1
- {"title": "Client Secret", "type": "string"}
+ {
+ "title": "Client Secret",
+ "type": "string",
+ "format": "password",
+ }
),
},
},