Commit c2d99ab7 authored by Artem Dobrynin (EPAM)'s avatar Artem Dobrynin (EPAM)
Browse files

GONRG-1547: Audit. Implement some audit events for Schema [publish]

https://jiraeu.epam.com/browse/GONRG-1547

* Added audit logger
* Added logging events in the `SchemaService`
* Updated `os-core-common` to fix double slash bug for endpoints
parent 3ea95ef9
......@@ -15,7 +15,7 @@
<properties>
<springfox-version>2.7.0</springfox-version>
<os-core-common.version>0.3.6</os-core-common.version>
<os-core-common.version>0.3.23</os-core-common.version>
</properties>
<dependencies>
......
......@@ -14,14 +14,17 @@ limitations under the License.*/
package org.opengroup.osdu.schema.util;
import lombok.RequiredArgsConstructor;
import org.opengroup.osdu.core.common.entitlements.EntitlementsAPIConfig;
import org.opengroup.osdu.core.common.entitlements.EntitlementsFactory;
import org.opengroup.osdu.core.common.entitlements.IEntitlementsFactory;
import org.opengroup.osdu.core.common.http.json.HttpResponseBodyMapper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.AbstractFactoryBean;
import org.springframework.stereotype.Component;
@Component
@RequiredArgsConstructor
public class EntitlementsClientFactory extends AbstractFactoryBean<IEntitlementsFactory> {
@Value("${AUTHORIZE_API}")
......@@ -30,10 +33,12 @@ public class EntitlementsClientFactory extends AbstractFactoryBean<IEntitlements
@Value("${AUTHORIZE_API_KEY}")
private String apiKey;
private final HttpResponseBodyMapper responseBodyMapper;
@Override
protected IEntitlementsFactory createInstance() throws Exception {
return new EntitlementsFactory(EntitlementsAPIConfig.builder().rootUrl(this.api).apiKey(this.apiKey).build());
return new EntitlementsFactory(EntitlementsAPIConfig.builder().rootUrl(this.api).apiKey(this.apiKey).build(), responseBodyMapper);
}
@Override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment