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

Commit 78b7dc3

Browse files
fix: STS Token API Response
1 parent b242a3d commit 78b7dc3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private ResponseEntity<StsTokenResponse> processTokenRequest(SecureTokenRequest
139139
.token(responseJwt.serialize())
140140
.expiresAt(responseJwt.getJWTClaimsSet().getExpirationTime().getTime())
141141
.build();
142-
return ResponseEntity.status(HttpStatus.CREATED).body(response);
142+
return ResponseEntity.status(HttpStatus.OK).body(response);
143143
}
144144

145145
@ExceptionHandler({ UnsupportedGrantTypeException.class, InvalidSecureTokenRequestException.class, UnknownBusinessPartnerNumberException.class, InvalidIdpTokenResponseException.class })

src/main/java/org/eclipse/tractusx/managedidentitywallets/domain/StsTokenResponse.java

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
package org.eclipse.tractusx.managedidentitywallets.domain;
2323

24+
import com.fasterxml.jackson.annotation.JsonProperty;
2425
import lombok.AllArgsConstructor;
2526
import lombok.Builder;
2627
import lombok.Getter;
@@ -33,6 +34,9 @@
3334
@NoArgsConstructor
3435
@AllArgsConstructor
3536
public class StsTokenResponse {
37+
38+
@JsonProperty("access_token")
3639
private String token;
40+
3741
private long expiresAt;
3842
}

0 commit comments

Comments
 (0)