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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o

### Fixed
- Fixed pagination in Integrations page [#7058](https://github.com/ethyca/fides/pull/7058)
- Fixed issue where the required `token_type` field was missing from the `api/v1/oauth/token` endpoint response [#7074](https://github.com/ethyca/fides/pull/7074)


## [2.75.2](https://github.com/ethyca/fides/compare/2.75.1..2.75.2)
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
black==24.3.0
debugpy==1.6.3
Faker==14.1.0
freezegun==1.5.1
freezegun==1.0.0
GitPython==3.1.41
isort==5.12.0
moto[s3]==5.1.0
Expand Down
3 changes: 2 additions & 1 deletion src/fides/api/schemas/oauth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, Optional
from typing import Dict, Literal, Optional

from fastapi import Form
from fastapi.openapi.models import OAuthFlows
Expand All @@ -14,6 +14,7 @@ class AccessToken(BaseModel):
"""A wrapper for the access_code returned upon successful authentication"""

access_token: str
token_type: Literal["Bearer"] = "Bearer"


# NOTE: Adapted from
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ def celery_worker_parameters():
takes longer to shut down, especially during parallel test runs with pytest-xdist.
The CI environment can be slow, so we use a generous timeout.
"""
return {"shutdown_timeout": 120.0}
return {"shutdown_timeout": 180.0}


@pytest.fixture(autouse=True, scope="session")
Expand Down
7 changes: 7 additions & 0 deletions tests/ops/api/v1/endpoints/test_oauth_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,10 @@ def test_get_access_token_root_client(self, url, api_client):

assert extracted_token[JWE_PAYLOAD_ROLES] == [OWNER]

# Check token type
token_type = json.loads(response.text).get("token_type")
assert token_type == "Bearer"
Comment on lines +444 to +445
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider adding similar token_type assertions to user login and invite acceptance tests in test_user_endpoints.py, since UserLoginResponse also contains the AccessToken schema


def test_get_access_token(self, db, url, api_client):
new_client, secret = ClientDetail.create_client_and_secret(
db,
Expand Down Expand Up @@ -468,6 +472,9 @@ def test_get_access_token(self, db, url, api_client):
== []
)

token_type = json.loads(response.text).get("token_type")
assert token_type == "Bearer"

new_client.delete(db)


Expand Down
Loading