diff --git a/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/SecureTokenControllerApiDoc.java b/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/SecureTokenControllerApiDoc.java index 587a8352..6219ce53 100644 --- a/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/SecureTokenControllerApiDoc.java +++ b/src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/SecureTokenControllerApiDoc.java @@ -130,7 +130,11 @@ public class SecureTokenControllerApiDoc { }) }) }) - @Operation(summary = "Create and Sign Access Tokens", description = "The endpoint for creating and signing access tokens which are to be used during a verifiable presentation flow.") - public @interface PostSecureTokenDoc { + @Operation(summary = "Create and Sign Access Tokens", description = "The endpoint for creating and signing access tokens which are to be used during a verifiable presentation flow.", method = "tokenJson") + public @interface PostSecureTokenDocJson { + } + + @Operation(summary = "Create and Sign Access Tokens", description = "The endpoint for creating and signing access tokens which are to be used during a verifiable presentation flow.", method = "tokenFormUrlencoded") + public @interface PostSecureTokenDocFormUrlencoded { } } diff --git a/src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java b/src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java index 1027d6f4..42ca8b94 100644 --- a/src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java +++ b/src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java @@ -82,8 +82,8 @@ void initBinder(WebDataBinder webDataBinder) { @SneakyThrows @PostMapping(path = "/api/token", consumes = { MediaType.APPLICATION_JSON_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE }) - @SecureTokenControllerApiDoc.PostSecureTokenDoc - public ResponseEntity token( + @SecureTokenControllerApiDoc.PostSecureTokenDocJson + public ResponseEntity tokenJson( @Valid @RequestBody SecureTokenRequest secureTokenRequest ) { return processTokenRequest(secureTokenRequest); @@ -91,8 +91,8 @@ public ResponseEntity token( @SneakyThrows @PostMapping(path = "/api/token", consumes = { MediaType.APPLICATION_FORM_URLENCODED_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE }) - @SecureTokenControllerApiDoc.PostSecureTokenDoc - public ResponseEntity token( + @SecureTokenControllerApiDoc.PostSecureTokenDocFormUrlencoded + public ResponseEntity tokenFormUrlencoded( @Valid @RequestBody MultiValueMap requestParameters ) { final SecureTokenRequest secureTokenRequest = getSecureTokenRequest(requestParameters);