Skip to content

Conversation

@MrBurtyyy
Copy link
Collaborator

@bucky-boy #504 will need merging, and this PR rebasing before it is ready to go in

@MrBurtyyy MrBurtyyy requested a review from bucky-boy December 12, 2025 10:21
@MrBurtyyy MrBurtyyy requested a review from irotech December 15, 2025 14:23
@MrBurtyyy MrBurtyyy marked this pull request as ready for review December 15, 2025 14:25
@MrBurtyyy MrBurtyyy changed the title Sdk 2771 sandbox SDK-2771: Introduce auth token support for the IDV sandbox Dec 15, 2025
@sonarqubecloud
Copy link


private static final Logger LOGGER = LoggerFactory.getLogger(Builder.class);

private String authenticationToken;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private String authenticationToken;
private String authToken;

for consistency?

Comment on lines +140 to +146
if (authenticationToken == null) {
validateForSignedRequest();
return new DocScanSandboxClient(sdkId, new DocsSignedRequestStrategy(keyPair, sdkId), new ObjectMapper(), new YotiHttpRequestBuilderFactory());
} else {
validateAuthToken();
return new DocScanSandboxClient(sdkId, new AuthTokenStrategy(authenticationToken), new ObjectMapper(), new YotiHttpRequestBuilderFactory());
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating new ObjectMapper and YotiHttpRequestBuilderFactory on every invocation they could be instantiated only once making them static final fields within this class

private static final ObjectMapper MAPPER = new ObjectMapper();
private static final YotiHttpRequestBuilderFactory REQUEST_BUILDER_FACTORY = new YotiHttpRequestBuilderFactory();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants