mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 08:09:37 +00:00
15 lines
393 B
Python
15 lines
393 B
Python
import time
|
|
|
|
from werkzeug.security import gen_salt
|
|
|
|
from project.models import OAuth2Client
|
|
|
|
|
|
def complete_oauth2_client(oauth2_client: OAuth2Client) -> None:
|
|
if not oauth2_client.id:
|
|
oauth2_client.client_id = gen_salt(24)
|
|
oauth2_client.client_id_issued_at = int(time.time())
|
|
|
|
if oauth2_client.client_secret is None:
|
|
oauth2_client.client_secret = gen_salt(48)
|