Skip to content

Commit

Permalink
chore: use nucleus' serializer factory
Browse files Browse the repository at this point in the history
  • Loading branch information
jcosentino11 committed Feb 5, 2024
1 parent ef8a280 commit ce82f34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
<version>2.6.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.aws.greengrass</groupId>
<artifactId>component-common</artifactId>
<version>2.1.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.aws.greengrass</groupId>
<artifactId>nucleus</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package com.aws.greengrass.clientdevices.auth;

import com.amazon.aws.iot.greengrass.component.common.SerializerFactory;
import com.aws.greengrass.authorization.AuthorizationHandler;
import com.aws.greengrass.authorization.exceptions.AuthorizationException;
import com.aws.greengrass.clientdevices.auth.api.ClientDevicesAuthServiceApi;
Expand Down Expand Up @@ -46,9 +47,7 @@
import com.aws.greengrass.ipc.VerifyClientDeviceIdentityOperationHandler;
import com.aws.greengrass.lifecyclemanager.PluginService;
import com.aws.greengrass.util.Coerce;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import software.amazon.awssdk.aws.greengrass.GreengrassCoreIPCService;

import java.net.URISyntaxException;
Expand All @@ -71,9 +70,7 @@
@ImplementsService(name = ClientDevicesAuthService.CLIENT_DEVICES_AUTH_SERVICE_NAME)
public class ClientDevicesAuthService extends PluginService {
public static final String CLIENT_DEVICES_AUTH_SERVICE_NAME = "aws.greengrass.clientdevices.Auth";
private static final ObjectMapper MAPPER = JsonMapper.builder()
.enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS, MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES)
.build();
private static final ObjectMapper MAPPER = SerializerFactory.getRecipeSerializerJson();
private static final String KV_NODE = "node";

// TODO: Move configuration related constants to appropriate configuration class
Expand Down

0 comments on commit ce82f34

Please sign in to comment.