Skip to content

Commit d077aa3

Browse files
authored
gen: LyoD 2025-06 + Lyo BOM (#388)
* gen: LyoD 2025-06 + Lyo BOM * build: add maven central snapshots * gen: Lyo Designer 7.0.0.202506271048
1 parent 90bca59 commit d077aa3

File tree

18 files changed

+2520
-2631
lines changed

18 files changed

+2520
-2631
lines changed

model/representations.aird

Lines changed: 1243 additions & 1363 deletions
Large diffs are not rendered by default.

src/server-am/pom.xml

Lines changed: 300 additions & 313 deletions
Large diffs are not rendered by default.

src/server-am/src/main/java/co/oslc/refimpl/am/gen/servlet/Application.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
// End of user code
8888

8989
/**
90-
* Generated by Lyo Designer 7.0.0.202501192243
90+
* Generated by Lyo Designer 7.0.0.202506271048
9191
*/
9292

9393
@OpenAPIDefinition(info = @Info(title = "AM", version = "1.0.0"), servers = @Server(url = "/services/"))

src/server-am/src/main/java/co/oslc/refimpl/am/gen/servlet/CredentialsFilter.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,28 @@ public class CredentialsFilter implements Filter {
7272
* @return true - the resource is protected, otherwise false
7373
*/
7474
private boolean isProtectedResource(HttpServletRequest httpRequest) {
75+
// Only for debugging!
7576
if (ignoreResourceProtection) {
7677
return false;
7778
}
79+
7880
String pathInfo = httpRequest.getPathInfo();
7981

8082
//'protectedResource' defines the basic set of requests that needs to be protected.
8183
//You can override this defintion in the user protected code block below.
84+
// Do not protect OSLC resources needed for initial discovery
8285
boolean protectedResource = !pathInfo.startsWith("/rootservices") && !pathInfo.startsWith("/oauth");
86+
// Do not protect CORS preflight requests
87+
if (protectedResource) {
88+
String method = httpRequest.getMethod();
89+
if ("OPTIONS".equalsIgnoreCase(method)) {
90+
protectedResource = false;
91+
}
92+
}
93+
// Here you can override or extend the checks
8394
// Start of user code isProtectedResource
8495
// End of user code
96+
8597
return protectedResource;
8698
}
8799

src/server-am/src/main/webapp/index.jsp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@
5353
</p>
5454
<p>Use Swagger UI To interact with the adaptor services dedicated for RDF.
5555
</p>
56-
<p>You can also copy <a href="<%= UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path("/openapi.yaml").build() %>">this OpenAPI specification document (yaml file) of this adaptor</a> to a <a href="<%= "https://editor.swagger.io" %>">Swagger Editor</a> to generate client SDK code for a number of languages and platforms.
56+
<p>You can also copy <a href="<%= UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path("/openapi.yaml").build() %>">
57+
this OpenAPI specification document (yaml file) of this adaptor</a> to a <a href="<%= "https://editor.swagger.io" %>">Swagger
58+
Editor</a> to generate client SDK code for a number of languages and platforms.
5759
</p>
60+
<p>The OSLC Root Services document is available at <code><%= UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path("/rootsevices").build() %></code></p>
5861
</div>
5962
</div>
6063
</body>

0 commit comments

Comments
 (0)