Skip to content

Commit

Permalink
Merge branch 'master' into fix-token-type-in-introspection
Browse files Browse the repository at this point in the history
  • Loading branch information
aliev authored May 4, 2023
2 parents 5756e1c + 394372a commit bfc1bbe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion aioauth/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def __init__(
description: Optional[str] = None,
headers: Optional[HTTPHeaderDict] = None,
):
super().__init__(request, description, headers or HTTPHeaderDict())
super().__init__(
request, description, headers or HTTPHeaderDict(default_headers)
)

auth_values = [f"error={self.error}"]
if self.description:
Expand Down
12 changes: 8 additions & 4 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
status_code=HTTPStatus.UNAUTHORIZED,
headers=HTTPHeaderDict(
{
**default_headers,
"www-authenticate": (
"Basic error=invalid_client, error_description=Missing client_id parameter."
)
),
}
),
),
Expand Down Expand Up @@ -118,9 +119,10 @@
status_code=HTTPStatus.UNAUTHORIZED,
headers=HTTPHeaderDict(
{
**default_headers,
"www-authenticate": (
"Basic error=invalid_client, error_description=Invalid client_id parameter value."
)
),
}
),
),
Expand Down Expand Up @@ -159,9 +161,10 @@
status_code=HTTPStatus.UNAUTHORIZED,
headers=HTTPHeaderDict(
{
**default_headers,
"www-authenticate": (
"Basic error=invalid_client, error_description=Invalid client_id parameter value."
)
),
}
),
),
Expand Down Expand Up @@ -258,9 +261,10 @@
status_code=HTTPStatus.UNAUTHORIZED,
headers=HTTPHeaderDict(
{
**default_headers,
"www-authenticate": (
"Basic error=invalid_client, error_description=Invalid client_id parameter value."
)
),
}
),
),
Expand Down

0 comments on commit bfc1bbe

Please sign in to comment.