Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backend/common/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def all_cors_origins(self) -> list[str]:
LOG_DIR: str = "logs"
LOG_FORMAT: str = "%(asctime)s - %(name)s - %(levelname)s:%(lineno)d - %(message)s"
SQL_DEBUG: bool = False

BASE_DIR: str = "/opt/sqlbot"
SCRIPT_DIR: str = f"{BASE_DIR}/scripts"
UPLOAD_DIR: str = "/opt/sqlbot/data/file"
SQLBOT_KEY_EXPIRED: int = 100 # License key expiration timestamp, 0 means no expiration

Expand Down
4 changes: 3 additions & 1 deletion frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,9 @@
"userinfo_url": "User Info URL",
"token_url": "Token URL",
"revoke_url": "Revocation URL",
"oauth2_field_mapping_placeholder": "Example: {'{'}\"account\": \"OAuth2Account\", \"name\": \"OAuth2Name\", \"email\": \"email\"{'}'}"
"oauth2_field_mapping_placeholder": "Example: {'{'}\"account\": \"OAuth2Account\", \"name\": \"OAuth2Name\", \"email\": \"email\"{'}'}",
"token_auth_method": "Token auth method",
"userinfo_auth_method": "Userinfo auth method"
},
"login": {
"default_login": "Default",
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/i18n/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,9 @@
"userinfo_url": "사용자 정보 URL",
"token_url": "토큰 URL",
"revoke_url": "취소 URL",
"oauth2_field_mapping_placeholder": "예: {'{'}\"account\": \"OAuth2Account\", \"name\": \"OAuth2Name\", \"email\": \"email\"{'}'}"
"oauth2_field_mapping_placeholder": "예: {'{'}\"account\": \"OAuth2Account\", \"name\": \"OAuth2Name\", \"email\": \"email\"{'}'}",
"token_auth_method": "토큰 인증 방식",
"userinfo_auth_method": "사용자 정보 인증 방식"
},
"login": {
"default_login": "기본값",
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,9 @@
"userinfo_url": "用户信息地址",
"token_url": "令牌地址",
"revoke_url": "撤销地址",
"oauth2_field_mapping_placeholder": "例如:{'{'}\"account\": \"oauth2Account\", \"name\": \"oauth2Name\", \"email\": \"email\"{'}'}"
"oauth2_field_mapping_placeholder": "例如:{'{'}\"account\": \"oauth2Account\", \"name\": \"oauth2Name\", \"email\": \"email\"{'}'}",
"token_auth_method": "Token 认证方式",
"userinfo_auth_method": "用户信息认证方式"
},
"login": {
"default_login": "默认",
Expand Down
16 changes: 16 additions & 0 deletions frontend/src/views/system/authentication/Oauth2Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const state = reactive({
client_id: '',
client_secret: '',
redirect_url: '',
token_auth_method: 'basic',
userinfo_auth_method: 'header',
logout_redirect_url: '',
mapping: '',
}),
Expand Down Expand Up @@ -367,6 +369,20 @@ onBeforeMount(() => {
</el-radio-group>
</el-form-item> -->

<el-form-item :label="t('authentication.token_auth_method')" prop="token_auth_method">
<el-radio-group v-model="state.form.token_auth_method">
<el-radio value="basic">Basic</el-radio>
<el-radio value="body">Body</el-radio>
</el-radio-group>
</el-form-item>

<el-form-item :label="t('authentication.userinfo_auth_method')" prop="userinfo_auth_method">
<el-radio-group v-model="state.form.userinfo_auth_method">
<el-radio value="header">Header</el-radio>
<el-radio value="query">Query</el-radio>
</el-radio-group>
</el-form-item>

<el-form-item
v-for="form_item in form_config_list"
:key="form_item.field"
Expand Down