File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
java/org/lfenergy/compas/scl/data/rest/v1 Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 8
8
import org .lfenergy .compas .scl .data .model .SclType ;
9
9
import org .lfenergy .compas .scl .data .rest .v1 .model .Type ;
10
10
import org .lfenergy .compas .scl .data .rest .v1 .model .TypeListResponse ;
11
+ import org .slf4j .Logger ;
12
+ import org .slf4j .LoggerFactory ;
11
13
12
14
import javax .enterprise .context .RequestScoped ;
13
15
import javax .inject .Inject ;
14
16
import javax .ws .rs .GET ;
17
+ import javax .ws .rs .HeaderParam ;
15
18
import javax .ws .rs .Path ;
16
19
import javax .ws .rs .Produces ;
17
20
import javax .ws .rs .core .MediaType ;
25
28
@ RequestScoped
26
29
@ Path ("/common/v1/" )
27
30
public class CompasCommonResource {
31
+ private static final Logger LOGGER = LoggerFactory .getLogger (CompasCommonResource .class );
32
+
28
33
@ Inject
29
34
SecurityIdentity securityIdentity ;
30
35
31
36
@ GET
32
37
@ Path ("/type/list" )
33
38
@ Produces (MediaType .APPLICATION_XML )
34
- public TypeListResponse list () {
39
+ public TypeListResponse list (@ HeaderParam ("Authorization" ) String authHeader ) {
40
+ LOGGER .debug ("Authorization Header '{}'" , authHeader );
41
+
35
42
// Retrieve the roles the logged in user has.
36
43
var roles = securityIdentity .getRoles ();
37
44
Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ basex.password = ${BASEX_PASSWORD:admin}
24
24
25
25
# Smallrye JWT Properties (Microprofile)
26
26
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
28
27
mp.jwt.verify.issuer = ${JWT_VERIFY_ISSUER:http://localhost:8089/auth/realms/compas}
29
28
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}
30
30
31
31
quarkus.http.auth.permission.deny-default.paths =/*
32
32
quarkus.http.auth.permission.deny-default.policy =deny
You can’t perform that action at this time.
0 commit comments