mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 08:29:49 -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 base64
|
||||||
import json
|
import json
|
||||||
from urllib.parse import unquote
|
|
||||||
import uuid
|
import uuid
|
||||||
from datetime import datetime, timedelta
|
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.main.views.verify import activate_user
|
||||||
from app.models.user import InvitedOrgUser, InvitedUser, User
|
from app.models.user import InvitedOrgUser, InvitedUser, User
|
||||||
from app.utils import hide_from_search_engines, hilite
|
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
|
from app.utils.user import is_gov_user
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import json
|
|||||||
import secrets
|
import secrets
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
|
|
||||||
from flask import current_app, request
|
|
||||||
|
|
||||||
from app import redis_client
|
from app import redis_client
|
||||||
from app.notify_client import NotifyAdminAPIClient, _attach_current_user, cache
|
from app.notify_client import NotifyAdminAPIClient, _attach_current_user, cache
|
||||||
from app.utils.user_permissions import (
|
from app.utils.user_permissions import (
|
||||||
@@ -41,12 +39,6 @@ class InviteApiClient(NotifyAdminAPIClient):
|
|||||||
}
|
}
|
||||||
data = _attach_current_user(data)
|
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
|
# make and store the nonce
|
||||||
nonce = secrets.token_urlsafe()
|
nonce = secrets.token_urlsafe()
|
||||||
redis_key = f"login-nonce-{unquote(nonce)}"
|
redis_key = f"login-nonce-{unquote(nonce)}"
|
||||||
|
|||||||
Reference in New Issue
Block a user