mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 00:43:46 +00:00
Preserve order of securitySchemes (#14536)
* Remove alphabetical sort * Update integration testing expectations * Regenerate files
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
from typing import List
|
||||
|
||||
|
||||
def info_from_api_key(api_key: str, required_scopes: None) -> dict:
|
||||
"""
|
||||
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.
|
||||
Should return None if api_key is invalid or does not allow access to called API.
|
||||
"""
|
||||
return {'uid': 'user_id'}
|
||||
|
||||
|
||||
def info_from_petstore_auth(token: str) -> dict:
|
||||
"""
|
||||
Validate and decode token.
|
||||
@@ -26,3 +16,13 @@ def validate_scope_petstore_auth(required_scopes: List[str], token_scopes: List[
|
||||
""" Validate required scopes are included in token scope """
|
||||
return set(required_scopes).issubset(set(token_scopes))
|
||||
|
||||
|
||||
def info_from_api_key(api_key: str, required_scopes: None) -> dict:
|
||||
"""
|
||||
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.
|
||||
Should return None if api_key is invalid or does not allow access to called API.
|
||||
"""
|
||||
return {'uid': 'user_id'}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user