refac
This commit is contained in:
1 parent
ff791b4814
commit
cde72dab71
2 files changed
+8
No files matched your search
@@ -1209,6 +1209,12 @@ TOOL_SERVER_CONNECTIONS = PersistentConfig(
|
|||||||
tool_server_connections,
|
tool_server_connections,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
OAUTH_CLIENT_TIMEOUT = PersistentConfig(
|
||||||
|
'OAUTH_CLIENT_TIMEOUT',
|
||||||
|
'oauth.client.timeout',
|
||||||
|
os.environ.get('OAUTH_CLIENT_TIMEOUT', ''),
|
||||||
|
)
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
# TERMINAL_SERVER
|
# TERMINAL_SERVER
|
||||||
####################################
|
####################################
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ from open_webui.models.groups import Groups, GroupModel, GroupUpdateForm, GroupF
|
|||||||
from open_webui.config import (
|
from open_webui.config import (
|
||||||
DEFAULT_USER_ROLE,
|
DEFAULT_USER_ROLE,
|
||||||
ENABLE_OAUTH_SIGNUP,
|
ENABLE_OAUTH_SIGNUP,
|
||||||
|
OAUTH_CLIENT_TIMEOUT,
|
||||||
OAUTH_REFRESH_TOKEN_INCLUDE_SCOPE,
|
OAUTH_REFRESH_TOKEN_INCLUDE_SCOPE,
|
||||||
OAUTH_MERGE_ACCOUNTS_BY_EMAIL,
|
OAUTH_MERGE_ACCOUNTS_BY_EMAIL,
|
||||||
OAUTH_PROVIDERS,
|
OAUTH_PROVIDERS,
|
||||||
@@ -597,6 +598,7 @@ class OAuthClientManager:
|
|||||||
'client_secret': oauth_client_info.client_secret,
|
'client_secret': oauth_client_info.client_secret,
|
||||||
'client_kwargs': {
|
'client_kwargs': {
|
||||||
'follow_redirects': True,
|
'follow_redirects': True,
|
||||||
|
**({'timeout': int(OAUTH_CLIENT_TIMEOUT.value)} if OAUTH_CLIENT_TIMEOUT.value else {}),
|
||||||
**({'scope': oauth_client_info.scope} if oauth_client_info.scope else {}),
|
**({'scope': oauth_client_info.scope} if oauth_client_info.scope else {}),
|
||||||
**(
|
**(
|
||||||
{'token_endpoint_auth_method': oauth_client_info.token_endpoint_auth_method}
|
{'token_endpoint_auth_method': oauth_client_info.token_endpoint_auth_method}
|
||||||
|
|||||||
Reference in new issue
Block a user