Allow auth providers to influence is_active (#15557)

* Allow auth providers to influence is_active

* Fix auth script test
This commit is contained in:
Paulus Schoutsen authored and Paulus Schoutsen committed 2018-07-20 12:32:44 +02:00
1 parent 61b3822374
commit b3bed7fb37
11 files changed
+82 -23

No files matched your search

+1 -8
View File
@@ -81,16 +81,9 @@ async def add_user(hass, provider, args):
print("Username already exists!")
return
credentials = await provider.async_get_or_create_credentials({
'username': args.username
})
user = await hass.auth.async_create_user(args.username)
await hass.auth.async_link_user(user, credentials)
# Save username/password
await provider.data.async_save()
print("User created")
print("Auth created")
async def validate_login(hass, provider, args):