Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow/providers/amazon/aws/auth_manager/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def login(self):
saml_auth = self._init_saml_auth()
return redirect(saml_auth.login())

@expose("/logout")
@expose("/logout", methods=("GET", "POST"))
def logout(self):
"""Start logout process."""
session.clear()
Expand Down
4 changes: 2 additions & 2 deletions tests/providers/amazon/aws/auth_manager/views/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def aws_app():
) as mock_is_policy_store_schema_up_to_date:
mock_is_policy_store_schema_up_to_date.return_value = True
mock_parser.parse_remote.return_value = SAML_METADATA_PARSED
return application.create_app(testing=True)
return application.create_app(testing=True, config={"WTF_CSRF_ENABLED": False})


@pytest.mark.db_test
Expand All @@ -82,7 +82,7 @@ def test_login_redirect_to_identity_center(self, aws_app):

def test_logout_redirect_to_identity_center(self, aws_app):
with aws_app.test_client() as client:
response = client.get("/logout")
response = client.post("/logout")
assert response.status_code == 302
assert response.location.startswith("https://portal.sso.us-east-1.amazonaws.com/saml/logout/")

Expand Down