Update Note to configure SSO authored by 过纯中's avatar 过纯中
## local debug settings ## local debug settings
``` ```
options = { options = {
name: "openid_connect", name: "openid_connect",
display_name: "天华单点登录", display_name: "天华单点登录",
scope: %i[openid email profile departments positions main_position], scope: %i[openid email profile departments positions main_position],
response_type: "code", response_type: "code",
uid_field: "email", uid_field: "email",
host: "sso-id.com", host: "sso-id.com",
identifier: "2RNTuN6ZADbHlD8Yhox2awaZUy0-RckCcByknP_9Uw4", identifier: "2RNTuN6ZADbHlD8Yhox2awaZUy0-RckCcByknP_9Uw4",
secret: "p2JqkYWSAU3obaazRCm9c_XlqrmJG7yaIoRiM28XC34", secret: "p2JqkYWSAU3obaazRCm9c_XlqrmJG7yaIoRiM28XC34",
issuer: "https://sso-id.com", issuer: "https://sso-id.com",
client_auth_method: "query", client_auth_method: "query",
discovery: true discovery: true
} }
Setting.plugin_openproject_openid_connect = Hash({}).deep_merge({ Setting.plugin_openproject_openid_connect = Hash({}).deep_merge({
"providers" => { "providers" => {
"openid_connect" => options "openid_connect" => options
} }
}) })
``` ```
## Production settings ## Production settings
```ruby ```ruby
options = { options = {
name: "openid_connect", name: "openid_connect",
display_name: "天华单点登录", display_name: "天华单点登录",
scope: %i[openid clerk_code chinese_name phone], scope: %i[openid clerk_code chinese_name phone],
response_type: "code", response_type: "code",
uid_field: "email", uid_field: "email",
host: "sso.thape.com.com", host: "sso.thape.com.com",
identifier: "", identifier: "",
secret: "", secret: "",
issuer: "https://sso.thape.com.cn", issuer: "https://sso.thape.com.cn",
client_auth_method: "query", client_auth_method: "query",
discovery: true discovery: true
} }
Setting.plugin_openproject_openid_connect = Hash({}).deep_merge({ Setting.plugin_openproject_openid_connect = Hash({}).deep_merge({
"providers" => { "providers" => {
"openid_connect" => options "openid_connect" => options
} }
}) })
``` ```
\ No newline at end of file
# Manual setting
https://github.com/doorkeeper-gem/doorkeeper-openid_connect?tab=readme-ov-file#routes
https://sso.thape.com.cn/.well-known/openid-configuration