13
13
import javax .ws .rs .core .MediaType ;
14
14
import javax .ws .rs .core .Response ;
15
15
16
- import org .eclipse .microprofile .jwt .JsonWebToken ;
17
16
import org .eclipse .microprofile .openapi .annotations .Operation ;
18
17
import org .eclipse .microprofile .openapi .annotations .responses .APIResponse ;
19
18
import org .eclipse .microprofile .openapi .annotations .responses .APIResponses ;
31
30
public class ConfigResource {
32
31
private static final Logger LOGGER = LoggerFactory .getLogger (ConfigResource .class );
33
32
34
- @ Inject
35
- JsonWebToken jwt ;
36
-
37
33
@ Inject
38
34
ConfigService configService ;
39
35
40
36
@ GET
41
- @ SecurityRequirement (name = "jwt" , scopes = {} )
37
+ @ SecurityRequirement (name = "jwt" )
42
38
@ APIResponses (value = { @ APIResponse (responseCode = "401" , description = "Missing or Invalid JWT" ),
43
39
@ APIResponse (responseCode = "200" , description = "Configuration file data has been returned." ) })
44
40
@ Operation (summary = "Returns configuration file data." )
@@ -49,7 +45,7 @@ public Response fetchConfigData(@QueryParam("type") Optional<String> type) {
49
45
50
46
@ PUT
51
47
@ Path ("/rbac/cache" )
52
- @ SecurityRequirement (name = "jwt" , scopes = {} )
48
+ @ SecurityRequirement (name = "jwt" )
53
49
@ APIResponses (value = { @ APIResponse (responseCode = "401" , description = "Missing or Invalid JWT" ),
54
50
@ APIResponse (responseCode = "200" , description = "Cache invalidated." ) })
55
51
public Response invalidateRbacCache () {
@@ -59,18 +55,30 @@ public Response invalidateRbacCache() {
59
55
60
56
@ GET
61
57
@ Path ("artifact/options" )
58
+ @ SecurityRequirement (name = "jwt" )
59
+ @ APIResponses (value = { @ APIResponse (responseCode = "401" , description = "Missing or Invalid JWT" ),
60
+ @ APIResponse (responseCode = "200" , description = "Artifact ptions success." ) })
61
+ @ Operation (summary = "Returns a map of key value pairs or artifact option." )
62
62
public Map <String , String > getArtifactOptions () {
63
63
return configService .getArtifactOptions ();
64
64
}
65
65
66
66
@ GET
67
67
@ Path ("engagement/options" )
68
+ @ SecurityRequirement (name = "jwt" )
69
+ @ APIResponses (value = { @ APIResponse (responseCode = "401" , description = "Missing or Invalid JWT" ),
70
+ @ APIResponse (responseCode = "200" , description = "Engagement options success." ) })
71
+ @ Operation (summary = "Returns a map of key value pairs or engagement option." )
68
72
public Map <String , String > getEngagementOptions () {
69
73
return configService .getEngagementOptions ();
70
74
}
71
75
72
76
@ GET
73
77
@ Path ("region/options" )
78
+ @ SecurityRequirement (name = "jwt" )
79
+ @ APIResponses (value = { @ APIResponse (responseCode = "401" , description = "Missing or Invalid JWT" ),
80
+ @ APIResponse (responseCode = "200" , description = "Region options success." ) })
81
+ @ Operation (summary = "Returns a map of key value pairs or region option." )
74
82
public Map <String , String > getRegionOptions () {
75
83
return configService .getRegionOptions ();
76
84
}
0 commit comments