|
```ruby
|
|
```ruby
|
|
options = {
|
|
options = {
|
|
name: "openid_connect",
|
|
name: "openid_connect",
|
|
scope: %i[openid departments positions main_position clerk_code chinese_name phone],
|
|
display_name: "天华单点登录",
|
|
|
|
scope: %i[openid email],
|
|
response_type: "code",
|
|
response_type: "code",
|
|
uid_field: "email",
|
|
uid_field: "email",
|
|
|
|
host: "sso.thape.com.com",
|
|
|
|
identifier: "",
|
|
|
|
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
|
|
client_options: {
|
|
|
|
"display_name"=>"Thape",
|
|
|
|
"host"=>"sso.thape.com.com",
|
|
|
|
"identifier"=>"",
|
|
|
|
"secret"=>"",
|
|
|
|
"authorization_endpoint" => "/oauth2/authorize",
|
|
|
|
"token_endpoint" => "/oauth2/token",
|
|
|
|
"userinfo_endpoint" => "/oauth2/userinfo",
|
|
|
|
"jwks_uri": '/oauth/discovery/keys'
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
|
|
Setting.plugin_openproject_openid_connect = Hash(Setting.plugin_openproject_openid_connect || {}).deep_merge({
|
|
|
|
|
|
Setting.plugin_openproject_openid_connect = Hash({}).deep_merge({
|
|
"providers" => {
|
|
"providers" => {
|
|
"openid_connect" => options
|
|
"openid_connect" => options
|
|
}
|
|
}
|
... | | ... | |