mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-28 01:10:37 +00:00
fixing some typing issues, white space, etal...
This commit is contained in:
parent
64e30358aa
commit
e0dc3d19b5
@ -53,7 +53,7 @@ def auth() -> str:
|
|||||||
|
|
||||||
|
|
||||||
@openid_blueprint.route("/form_submit", methods=["POST"])
|
@openid_blueprint.route("/form_submit", methods=["POST"])
|
||||||
def form_submit() -> Response | str:
|
def form_submit() -> Any:
|
||||||
users = get_users()
|
users = get_users()
|
||||||
if (
|
if (
|
||||||
request.values["Uname"] in users
|
request.values["Uname"] in users
|
||||||
|
@ -36,7 +36,7 @@ class AuthenticationService:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def server_url() -> str:
|
def server_url() -> str:
|
||||||
return current_app.config.get("OPEN_ID_SERVER_URL","")
|
return current_app.config.get("OPEN_ID_SERVER_URL", "")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def secret_key() -> str:
|
def secret_key() -> str:
|
||||||
@ -61,11 +61,10 @@ class AuthenticationService:
|
|||||||
def logout(self, id_token: str, redirect_url: Optional[str] = None) -> Response:
|
def logout(self, id_token: str, redirect_url: Optional[str] = None) -> Response:
|
||||||
"""Logout."""
|
"""Logout."""
|
||||||
if redirect_url is None:
|
if redirect_url is None:
|
||||||
redirect_url = "/"
|
redirect_url = f"{self.get_backend_url()}/v1.0/logout_return"
|
||||||
return_redirect_url = f"{self.get_backend_url()}/v1.0/logout_return"
|
|
||||||
request_url = (
|
request_url = (
|
||||||
self.open_id_endpoint_for_name("end_session_endpoint")
|
self.open_id_endpoint_for_name("end_session_endpoint")
|
||||||
+ f"?post_logout_redirect_uri={return_redirect_url}&"
|
+ f"?post_logout_redirect_uri={redirect_url}&"
|
||||||
+ f"id_token_hint={id_token}"
|
+ f"id_token_hint={id_token}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class TestFaskOpenId(BaseTest):
|
|||||||
# It should be possible to get to a login page
|
# It should be possible to get to a login page
|
||||||
data = {"state": {"bubblegum": 1, "daydream": 2}}
|
data = {"state": {"bubblegum": 1, "daydream": 2}}
|
||||||
response = client.get("/openid/auth", query_string=data)
|
response = client.get("/openid/auth", query_string=data)
|
||||||
assert b"<h2>Login to SpiffWorkflow</h2>" in response.data
|
assert b"<h2>Login</h2>" in response.data
|
||||||
assert b"bubblegum" in response.data
|
assert b"bubblegum" in response.data
|
||||||
|
|
||||||
def test_get_token(
|
def test_get_token(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user