mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-03 13:00:03 -04:00
black, isort, and flake8.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import base64
|
||||
import json
|
||||
from urllib.parse import unquote
|
||||
import uuid
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
@@ -27,7 +26,6 @@ from app.main.views import sign_in
|
||||
from app.main.views.verify import activate_user
|
||||
from app.models.user import InvitedOrgUser, InvitedUser, User
|
||||
from app.utils import hide_from_search_engines, hilite
|
||||
from app.utils.login import get_id_token
|
||||
from app.utils.user import is_gov_user
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ import json
|
||||
import secrets
|
||||
from urllib.parse import unquote
|
||||
|
||||
from flask import current_app, request
|
||||
|
||||
from app import redis_client
|
||||
from app.notify_client import NotifyAdminAPIClient, _attach_current_user, cache
|
||||
from app.utils.user_permissions import (
|
||||
@@ -41,12 +39,6 @@ class InviteApiClient(NotifyAdminAPIClient):
|
||||
}
|
||||
data = _attach_current_user(data)
|
||||
|
||||
# make the state variable to properly store the nonce.
|
||||
# this matches the api code in app.service_invite.rest.get_user_data_url_safe()
|
||||
state_data = json.dumps(data)
|
||||
state_data = base64.b64encode(state_data.encode("utf8"))
|
||||
state = state_data.decode("utf8")
|
||||
|
||||
# make and store the nonce
|
||||
nonce = secrets.token_urlsafe()
|
||||
redis_key = f"login-nonce-{unquote(nonce)}"
|
||||
|
||||
Reference in New Issue
Block a user