mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
black, isort, and flake8.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
This commit is contained in:
@@ -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