Skip to content

Commit 41dcf85

Browse files
author
Dennis Labordus
authored
Merge pull request #65 from com-pas/develop
Merge Develop to Main (Release)
2 parents ab6f8f8 + 941f615 commit 41dcf85

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/src/main/java/org/lfenergy/compas/scl/data/rest/v1/CompasCommonResource.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
import org.lfenergy.compas.scl.data.model.SclType;
99
import org.lfenergy.compas.scl.data.rest.v1.model.Type;
1010
import org.lfenergy.compas.scl.data.rest.v1.model.TypeListResponse;
11+
import org.slf4j.Logger;
12+
import org.slf4j.LoggerFactory;
1113

1214
import javax.enterprise.context.RequestScoped;
1315
import javax.inject.Inject;
1416
import javax.ws.rs.GET;
17+
import javax.ws.rs.HeaderParam;
1518
import javax.ws.rs.Path;
1619
import javax.ws.rs.Produces;
1720
import javax.ws.rs.core.MediaType;
@@ -25,13 +28,17 @@
2528
@RequestScoped
2629
@Path("/common/v1/")
2730
public class CompasCommonResource {
31+
private static final Logger LOGGER = LoggerFactory.getLogger(CompasCommonResource.class);
32+
2833
@Inject
2934
SecurityIdentity securityIdentity;
3035

3136
@GET
3237
@Path("/type/list")
3338
@Produces(MediaType.APPLICATION_XML)
34-
public TypeListResponse list() {
39+
public TypeListResponse list(@HeaderParam("Authorization") String authHeader) {
40+
LOGGER.debug("Authorization Header '{}'", authHeader);
41+
3542
// Retrieve the roles the logged in user has.
3643
var roles = securityIdentity.getRoles();
3744

app/src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ basex.password = ${BASEX_PASSWORD:admin}
2424

2525
# Smallrye JWT Properties (Microprofile)
2626
smallrye.jwt.verify.key.location = ${JWT_VERIFY_KEY:http://localhost:8089/auth/realms/compas/protocol/openid-connect/certs}
27-
smallrye.jwt.path.groups = resource_access/scl-data-service/roles
2827
mp.jwt.verify.issuer = ${JWT_VERIFY_ISSUER:http://localhost:8089/auth/realms/compas}
2928
mp.jwt.verify.audiences = ${JWT_VERIFY_CLIENT_ID:scl-data-service}
29+
smallrye.jwt.path.groups = ${JWT_GROUPS_PATH:resource_access/scl-data-service/roles}
3030

3131
quarkus.http.auth.permission.deny-default.paths=/*
3232
quarkus.http.auth.permission.deny-default.policy=deny

0 commit comments

Comments
 (0)