Skip to content

Commit

Permalink
Fix STS Token API Response
Browse files Browse the repository at this point in the history
  • Loading branch information
hemantxpatel committed Apr 29, 2024
1 parent b242a3d commit bb98774
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private ResponseEntity<StsTokenResponse> 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 })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -33,6 +34,9 @@
@NoArgsConstructor
@AllArgsConstructor
public class StsTokenResponse {

@JsonProperty("access_token")
private String token;

private long expiresAt;
}

0 comments on commit bb98774

Please sign in to comment.