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 82e74e1e9..1027d6f48 100644 --- a/src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java +++ b/src/main/java/org/eclipse/tractusx/managedidentitywallets/controller/SecureTokenController.java @@ -139,7 +139,7 @@ private ResponseEntity processTokenRequest(SecureTokenRequest .token(responseJwt.serialize()) .expiresAt(responseJwt.getJWTClaimsSet().getExpirationTime().getTime()) .build(); - return ResponseEntity.status(HttpStatus.CREATED).body(response); + return ResponseEntity.status(HttpStatus.OK).body(response); } @ExceptionHandler({ UnsupportedGrantTypeException.class, InvalidSecureTokenRequestException.class, UnknownBusinessPartnerNumberException.class, InvalidIdpTokenResponseException.class }) diff --git a/src/main/java/org/eclipse/tractusx/managedidentitywallets/domain/StsTokenResponse.java b/src/main/java/org/eclipse/tractusx/managedidentitywallets/domain/StsTokenResponse.java index 2e78cfff0..50161b118 100644 --- a/src/main/java/org/eclipse/tractusx/managedidentitywallets/domain/StsTokenResponse.java +++ b/src/main/java/org/eclipse/tractusx/managedidentitywallets/domain/StsTokenResponse.java @@ -21,6 +21,7 @@ package org.eclipse.tractusx.managedidentitywallets.domain; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; @@ -33,6 +34,9 @@ @NoArgsConstructor @AllArgsConstructor public class StsTokenResponse { + + @JsonProperty("access_token") private String token; + private long expiresAt; }