Skip to content

Commit

Permalink
- fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
pefernan committed Nov 1, 2024
1 parent fb04419 commit 2eed4f5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class SpringIdentityProviderFactoryProducer {
@Bean
public IdentityProviderFactory produce(IdentityProvider identityProvider,
@Value("${" + IdentityProviderFactory.KOGITO_SECURITY_AUTH_ENABLED + ":false}") boolean enabled,
@Value("${" + IdentityProviderFactory.KOGITO_SECURITY_AUTH_IMPERSONATION_ALLOWED_FOR_ROLES + "}") Optional<String> configRolesThatAllowImpersonation) {
@Value("${" + IdentityProviderFactory.KOGITO_SECURITY_AUTH_IMPERSONATION_ALLOWED_FOR_ROLES + ":#{null}}") Optional<String> configRolesThatAllowImpersonation) {
String[] rolesThatAllowImpersonation = configRolesThatAllowImpersonation.map(roles -> roles.split(",")).orElse(new String[] {});
return new IdentityProviderFactoryImpl(identityProvider, new KogitoAuthConfig(enabled, List.of(rolesThatAllowImpersonation)));
}
Expand Down

0 comments on commit 2eed4f5

Please sign in to comment.