tenant admin pw reset use secrets lib, csp calls do not return the result data class

This commit is contained in:
2020-03-06 10:50:06 -05:00
parent 8734a35bf8
commit f9a45e68bb
4 changed files with 2 additions and 7 deletions

View File

@@ -1,5 +1,4 @@
import json
import random
import string
from secrets import token_hex, token_urlsafe
from uuid import uuid4
@@ -1603,8 +1602,7 @@ class AzureCloudProvider(CloudProviderInterface):
"passwordProfile": {
"forceChangePasswordNextSignIn": True,
"forceChangePasswordNextSignInWithMfa": False,
"password": payload.new_password
or "".join(random.choice(string.ascii_letters) for i in range(15)),
"password": payload.new_password or token_urlsafe(16),
}
}