Skip to content

Commit

Permalink
Add open access feature in JWTFilter for unauthenticated requests
Browse files Browse the repository at this point in the history
Implemented open access configuration parameters and methods in PicSureWarInit. JWTFilter now checks for open access settings and validates requests accordingly, allowing unauthenticated access when enabled.
  • Loading branch information
Gcolon021 committed Sep 11, 2024
1 parent a4ddf4f commit f7d0985
Show file tree
Hide file tree
Showing 2 changed files with 356 additions and 238 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public class PicSureWarInit {
@Resource(mappedName = "java:global/defaultApplicationUUID")
private String default_application_uuid;

@Resource(mappedName = "java:global/openAccessEnabled")
private boolean open_access_enabled;
@Resource(mappedName = "java:global/openAccessValidateUrl")
private String open_access_validate_url;

// to be able to pre modified
public static final ObjectMapper objectMapper = new ObjectMapper();

Expand All @@ -45,6 +50,7 @@ public class PicSureWarInit {
CLOSEABLE_HTTP_CLIENT = HttpClients.custom().setConnectionManager(HTTP_CLIENT_CONNECTION_MANAGER).useSystemProperties().build();
}


public String getToken_introspection_url() {
return token_introspection_url;
}
Expand All @@ -61,4 +67,13 @@ public String getToken_introspection_token() {
public String getDefaultApplicationUUID() {
return this.default_application_uuid;
}

public boolean isOpenAccessEnabled() {
return open_access_enabled;
}

public String getOpenAccessValidateUrl() {
return this.open_access_validate_url;
}

}
Loading

0 comments on commit f7d0985

Please sign in to comment.