Skip to content
Open
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 @@ -40,6 +40,8 @@ public void filter(ContainerRequestContext requestContext) throws IOException {
// Validate origin based authentication
String originHeader =
requestContext.getHeaderString("origin");
LOGGER.info("originHeader" + originHeader);
LOGGER.info("token" + token);
if (isEdgeTagBasedAuthentication(originHeader)) {
try {
if (!validateEdgeBasedToken(originHeader, token)) {
Expand Down Expand Up @@ -97,6 +99,7 @@ private boolean isTokenBasedAuthentication(String authorizationHeader) {
}

private boolean isEdgeTagBasedAuthentication(String originHeader) {
LOGGER.info("inside isEdgeTagBasedAuthentication");
return originHeader != null &&
EdgeTagClient.getEdgeTagOrigins().contains(originHeader);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public boolean validateToken(String token) throws IOException, InterruptedExcept
}

public boolean validateEdgeTagBasedAuthentication(String origin, String token) throws IOException, InterruptedException {
LOGGER.info("inside validateEdgeTagBasedAuthentication");
final var request = HttpRequest
.newBuilder(URI.create(configs.getBlotoutBaseUrl() + configs.getBlotoutAuthEndpoint()))
.timeout(Duration.ofSeconds(120))
Expand Down