Content
View differences
Updated by Markus Kahl over 5 years ago
**As** an OpenProject system admin
**I want to** be able to configure a static map changing the omniauth attribute mapping
**so that** this configuration can be saved in the database (settings) and doesn't require a custom initiailizer or plugin.
**Acceptance criteria**
* Allow OmniAuth strategies to provide a static attribute mapping on top of the [already supported lambda](https://github.com/opf/openproject/blob/dev/modules/auth_plugins/lib/omni_auth/flexible_strategy.rb#L57)
This should then allow for mapping attribures through the settings like this:
```ruby
Setting.plugin_openproject_openid_connect = {
"providers" => {
"azure" => {
"display_name" => "Azure",
"identifier" => "...",
"secret" => "...",
"openproject_attribute_map" => {
"login" => "UserPrincipalName",
"mail" => "email"
}
}
}
}
```
**I want to** be able to configure a static map changing the omniauth attribute mapping
**so that** this configuration can be saved in the database (settings) and doesn't require a custom initiailizer or plugin.
**Acceptance criteria**
* Allow OmniAuth strategies to provide a static attribute mapping on top of the [already supported lambda](https://github.com/opf/openproject/blob/dev/modules/auth_plugins/lib/omni_auth/flexible_strategy.rb#L57)
This should then allow for mapping attribures through the settings like this:
```ruby
Setting.plugin_openproject_openid_connect = {
"providers" => {
"azure" => {
"display_name" => "Azure",
"identifier" => "...",
"secret" => "...",
"openproject_attribute_map" => {
"login" => "UserPrincipalName",
"mail" => "email"
}
}
}
}
```