-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make refreshing the XSRF token conditional on whether the openapi end…
…point needs authentication. (#3626) * Baseline openapi bindings. * Make refreshing the XSRF token conditional on whether the openapi endpoint needs authentication. * Update the test for the new middleware behavior.
- Loading branch information
Showing
10 changed files
with
79 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,6 @@ | |
"prepare": "npm run build" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.3" | ||
"typescript": "^4.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
gen/py/chromestatus_openapi/chromestatus_openapi/controllers/security_controller.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,18 @@ | ||
from typing import List | ||
|
||
|
||
def info_from_XsrfToken(api_key, required_scopes): | ||
""" | ||
Check and retrieve authentication information from api_key. | ||
Returned value will be passed in 'token_info' parameter of your operation function, if there is one. | ||
'sub' or 'uid' will be set in 'user' parameter of your operation function, if there is one. | ||
:param api_key API key provided by Authorization header | ||
:type api_key: str | ||
:param required_scopes Always None. Used for other authentication method | ||
:type required_scopes: None | ||
:return: Information attached to provided api_key or None if api_key is invalid or does not allow access to called API | ||
:rtype: dict | None | ||
""" | ||
return {'uid': 'user_id'} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.