mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
enh: OAUTH_TOKEN_ENDPOINT_AUTH_METHOD
This commit is contained in:
parent
19f1286cc7
commit
4f5d949af6
1 changed files with 13 additions and 0 deletions
|
|
@ -445,6 +445,12 @@ OAUTH_TIMEOUT = PersistentConfig(
|
||||||
os.environ.get("OAUTH_TIMEOUT", ""),
|
os.environ.get("OAUTH_TIMEOUT", ""),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
OAUTH_TOKEN_ENDPOINT_AUTH_METHOD = PersistentConfig(
|
||||||
|
"OAUTH_TOKEN_ENDPOINT_AUTH_METHOD",
|
||||||
|
"oauth.oidc.token_endpoint_auth_method",
|
||||||
|
os.environ.get("OAUTH_TOKEN_ENDPOINT_AUTH_METHOD", None),
|
||||||
|
)
|
||||||
|
|
||||||
OAUTH_CODE_CHALLENGE_METHOD = PersistentConfig(
|
OAUTH_CODE_CHALLENGE_METHOD = PersistentConfig(
|
||||||
"OAUTH_CODE_CHALLENGE_METHOD",
|
"OAUTH_CODE_CHALLENGE_METHOD",
|
||||||
"oauth.oidc.code_challenge_method",
|
"oauth.oidc.code_challenge_method",
|
||||||
|
|
@ -636,6 +642,13 @@ def load_oauth_providers():
|
||||||
def oidc_oauth_register(client: OAuth):
|
def oidc_oauth_register(client: OAuth):
|
||||||
client_kwargs = {
|
client_kwargs = {
|
||||||
"scope": OAUTH_SCOPES.value,
|
"scope": OAUTH_SCOPES.value,
|
||||||
|
**(
|
||||||
|
{
|
||||||
|
"token_endpoint_auth_method": OAUTH_TOKEN_ENDPOINT_AUTH_METHOD.value
|
||||||
|
}
|
||||||
|
if OAUTH_TOKEN_ENDPOINT_AUTH_METHOD.value
|
||||||
|
else {}
|
||||||
|
)
|
||||||
** (
|
** (
|
||||||
{"timeout": int(OAUTH_TIMEOUT.value)} if OAUTH_TIMEOUT.value else {}
|
{"timeout": int(OAUTH_TIMEOUT.value)} if OAUTH_TIMEOUT.value else {}
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue