Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.yoti.api.client.spi.remote.call.YotiHttpRequestBuilderFactory;
import com.yoti.api.client.spi.remote.call.YotiHttpResponse;
import com.yoti.api.client.spi.remote.call.factory.AuthStrategy;
import com.yoti.api.client.spi.remote.call.factory.NoAuthStrategy;
import com.yoti.api.client.spi.remote.call.factory.UnsignedPathFactory;

import com.fasterxml.jackson.annotation.JsonInclude;
Expand Down Expand Up @@ -474,6 +475,7 @@ SupportedDocumentsResponse getSupportedDocuments(boolean includeNonLatin) throws

try {
YotiHttpRequest yotiHttpRequest = yotiHttpRequestBuilderFactory.create()
.withAuthStrategy(new NoAuthStrategy())
.withBaseUrl(apiUrl)
.withEndpoint(path)
.withHttpMethod(HTTP_GET)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.yoti.api.client.spi.remote.call.factory;

import java.security.GeneralSecurityException;
import java.util.Collections;
import java.util.List;

import org.apache.http.Header;
import org.apache.http.NameValuePair;

public class NoAuthStrategy implements AuthStrategy {

@Override
public List<Header> createAuthHeaders(String httpMethod, String endpoint, byte[] payload) throws GeneralSecurityException {
return Collections.emptyList();
}

@Override
public List<NameValuePair> createQueryParams() {
return Collections.emptyList();
}

}