use of org.keycloak.representations.provider.ScriptProviderDescriptor in project keycloak by keycloak.
the class UndeployedScriptMapperNotAvailableTest method deploy.
@Deployment(name = SCRIPT_DEPLOYMENT_NAME, managed = false, testable = false)
@TargetsContainer(AUTH_SERVER_CURRENT)
public static JavaArchive deploy() throws IOException {
ScriptProviderDescriptor representation = new ScriptProviderDescriptor();
representation.addMapper("My Mapper", "mapper-a.js");
return ShrinkWrap.create(JavaArchive.class, SCRIPT_DEPLOYMENT_NAME).addAsManifestResource(new StringAsset(JsonSerialization.writeValueAsPrettyString(representation)), "keycloak-scripts.json").addAsResource("scripts/mapper-example.js", "mapper-a.js");
}
Aggregations