Mark auth voluptuous schema fields as required (#57003)

This commit is contained in:
Paulus Schoutsen
2021-10-03 22:02:30 -07:00
committed by GitHub
parent 79b10c43d8
commit 2d374d65b6
9 changed files with 35 additions and 25 deletions

View File

@@ -38,12 +38,12 @@ class InsecureExampleModule(MultiFactorAuthModule):
@property
def input_schema(self) -> vol.Schema:
"""Validate login flow input data."""
return vol.Schema({"pin": str})
return vol.Schema({vol.Required("pin"): str})
@property
def setup_schema(self) -> vol.Schema:
"""Validate async_setup_user input data."""
return vol.Schema({"pin": str})
return vol.Schema({vol.Required("pin"): str})
async def async_setup_flow(self, user_id: str) -> SetupFlow:
"""Return a data entry flow handler for setup module.