Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 7190ed1

Browse files
committed
fix: adjust api docs for 'api/token' endpoint
1 parent 613831e commit 7190ed1

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/main/java/org/eclipse/tractusx/managedidentitywallets/apidocs/SecureTokenControllerApiDoc.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ public class SecureTokenControllerApiDoc {
130130
})
131131
})
132132
})
133-
@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.")
134-
public @interface PostSecureTokenDoc {
133+
@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")
134+
public @interface PostSecureTokenDocJson {
135+
}
136+
137+
@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")
138+
public @interface PostSecureTokenDocFormUrlencoded {
135139
}
136140
}

src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,17 @@ void initBinder(WebDataBinder webDataBinder) {
8282

8383
@SneakyThrows
8484
@PostMapping(path = "/api/token", consumes = { MediaType.APPLICATION_JSON_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE })
85-
@SecureTokenControllerApiDoc.PostSecureTokenDoc
86-
public ResponseEntity<StsTokenResponse> token(
85+
@SecureTokenControllerApiDoc.PostSecureTokenDocJson
86+
public ResponseEntity<StsTokenResponse> tokenJson(
8787
@Valid @RequestBody SecureTokenRequest secureTokenRequest
8888
) {
8989
return processTokenRequest(secureTokenRequest);
9090
}
9191

9292
@SneakyThrows
9393
@PostMapping(path = "/api/token", consumes = { MediaType.APPLICATION_FORM_URLENCODED_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE })
94-
@SecureTokenControllerApiDoc.PostSecureTokenDoc
95-
public ResponseEntity<StsTokenResponse> token(
94+
@SecureTokenControllerApiDoc.PostSecureTokenDocFormUrlencoded
95+
public ResponseEntity<StsTokenResponse> tokenFormUrlencoded(
9696
@Valid @RequestBody MultiValueMap<String, String> requestParameters
9797
) {
9898
final SecureTokenRequest secureTokenRequest = getSecureTokenRequest(requestParameters);

0 commit comments

Comments
 (0)