Skip to content

Commit

Permalink
fix: add secret converter for all IdP plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitgravitee committed Mar 21, 2024
1 parent fb177c7 commit 0e3e88d
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -16,6 +16,7 @@
package io.gravitee.rest.api.idp.core.plugin.impl;

import io.gravitee.common.util.RelaxedPropertySource;
import io.gravitee.node.api.secrets.model.Secret;
import io.gravitee.plugin.core.api.Plugin;
import io.gravitee.plugin.core.api.PluginContextFactory;
import io.gravitee.plugin.core.internal.AnnotationBasedPluginContextConfigurer;
Expand Down Expand Up @@ -129,6 +130,8 @@ public ConfigurableEnvironment environment() {
protected void customizePropertySources(MutablePropertySources propertySources) {
propertySources.addFirst(new RelaxedPropertySource(plugin.id(), properties));
super.customizePropertySources(propertySources);
this.getConversionService().addConverter(Secret.class, byte[].class, Secret::asBytes);
this.getConversionService().addConverter(Secret.class, String.class, Secret::asString);
}
};
}
Expand Down

0 comments on commit 0e3e88d

Please sign in to comment.