Skip to content

Commit

Permalink
Merge branch 'goauthentik:main' into sdko/sources/no-delete-built-in
Browse files Browse the repository at this point in the history
  • Loading branch information
dominic-r authored Feb 3, 2025
2 parents f4cacc4 + e4b6df3 commit d7d8ddb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions authentik/providers/oauth2/tests/test_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def test_auth_code_view(self):
"id_token": provider.encode(
access.id_token.to_dict(),
),
"scope": "",
},
)
self.validate_jwt(access, provider)
Expand Down Expand Up @@ -242,6 +243,7 @@ def test_refresh_token_view(self):
"id_token": provider.encode(
access.id_token.to_dict(),
),
"scope": "offline_access",
},
)
self.validate_jwt(access, provider)
Expand Down Expand Up @@ -301,6 +303,7 @@ def test_refresh_token_view_invalid_origin(self):
"id_token": provider.encode(
access.id_token.to_dict(),
),
"scope": "offline_access",
},
)

Expand Down
4 changes: 4 additions & 0 deletions authentik/providers/oauth2/views/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ def create_code_response(self) -> dict[str, Any]:
response = {
"access_token": access_token.token,
"token_type": TOKEN_TYPE,
"scope": " ".join(access_token.scope),
"expires_in": int(
timedelta_from_string(self.provider.access_token_validity).total_seconds()
),
Expand Down Expand Up @@ -710,6 +711,7 @@ def create_refresh_response(self) -> dict[str, Any]:
"access_token": access_token.token,
"refresh_token": refresh_token.token,
"token_type": TOKEN_TYPE,
"scope": " ".join(access_token.scope),
"expires_in": int(
timedelta_from_string(self.provider.access_token_validity).total_seconds()
),
Expand All @@ -736,6 +738,7 @@ def create_client_credentials_response(self) -> dict[str, Any]:
return {
"access_token": access_token.token,
"token_type": TOKEN_TYPE,
"scope": " ".join(access_token.scope),
"expires_in": int(
timedelta_from_string(self.provider.access_token_validity).total_seconds()
),
Expand Down Expand Up @@ -767,6 +770,7 @@ def create_device_code_response(self) -> dict[str, Any]:
response = {
"access_token": access_token.token,
"token_type": TOKEN_TYPE,
"scope": " ".join(access_token.scope),
"expires_in": int(
timedelta_from_string(self.provider.access_token_validity).total_seconds()
),
Expand Down
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d7d8ddb

Please sign in to comment.