Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit 713a1cf

Browse files
committed
Remove offline_access from oauth2/token.py
1 parent a963c93 commit 713a1cf

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

src/oidcop/oauth2/token.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,7 @@ def process_request(self, req: Union[Message, dict], **kwargs):
137137

138138
_log_debug("All checks OK")
139139

140-
issue_refresh = False
141-
if "issue_refresh" in kwargs:
142-
issue_refresh = kwargs["issue_refresh"]
143-
else:
144-
if "offline_access" in grant.scope:
145-
issue_refresh = True
146-
140+
issue_refresh = kwargs.get("issue_refresh", False)
147141
_response = {
148142
"token_type": "Bearer",
149143
"scope": grant.scope,
@@ -267,12 +261,7 @@ def process_request(self, req: Union[Message, dict], **kwargs):
267261
_resp["expires_in"] = access_token.expires_at - utc_time_sans_frac()
268262

269263
_mints = token.usage_rules.get("supports_minting")
270-
issue_refresh = False
271-
if "issue_refresh" in kwargs:
272-
issue_refresh = kwargs["issue_refresh"]
273-
else:
274-
if "offline_access" in scope:
275-
issue_refresh = True
264+
issue_refresh = kwargs.get("issue_refresh", False)
276265
if "refresh_token" in _mints and issue_refresh:
277266
refresh_token = self._mint_token(
278267
token_class="refresh_token",

0 commit comments

Comments
 (0)