|
```ruby
|
|
```ruby
|
|
options = {
|
|
options = {
|
|
|
|
name: "openid_connect",
|
|
|
|
scope: %i[openid departments positions main_position clerk_code chinese_name phone],
|
|
|
|
response_type: "code",
|
|
|
|
uid_field: "email",
|
|
|
|
issuer: "https://sso.thape.com.cn",
|
|
|
|
client_auth_method: "query",
|
|
|
|
discovery: true,
|
|
|
|
"client_options": {
|
|
"display_name"=>"Thape",
|
|
"display_name"=>"Thape",
|
|
"host"=>"sso.thape.com.com",
|
|
"host"=>"sso.thape.com.com",
|
|
"identifier"=>"",
|
|
"identifier"=>"",
|
... | @@ -9,4 +17,11 @@ options = { |
... | @@ -9,4 +17,11 @@ options = { |
|
"userinfo_endpoint" => "/oauth2/userinfo",
|
|
"userinfo_endpoint" => "/oauth2/userinfo",
|
|
"jwks_uri": '/oauth/discovery/keys'
|
|
"jwks_uri": '/oauth/discovery/keys'
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Setting.plugin_openproject_openid_connect = Hash(Setting.plugin_openproject_openid_connect || {}).deep_merge({
|
|
|
|
"providers" => {
|
|
|
|
"openid_connect" => options
|
|
|
|
}
|
|
|
|
})
|
|
``` |
|
``` |
|
|
|
\ No newline at end of file |