Skip to content

Commit

Permalink
Move @Creator to a new appropriate constructor (#1440)
Browse files Browse the repository at this point in the history
* Adds missing @Creator so Serde knows which constructor to use when deserializing

* Create an appropriate constructor receiving both grant_type and refresh_token to correctly deserialize with Serde
  • Loading branch information
mliberato authored Oct 26, 2023
1 parent ee46e0d commit fb2998a
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,22 @@ public TokenRefreshRequest() { }
*
* @param refreshToken Refresh token
*/
@Creator
public TokenRefreshRequest(String refreshToken) {
this.grantType = GRANT_TYPE_REFRESH_TOKEN;
this.refreshToken = refreshToken;
}

/**
*
* @param grantType Grant type
* @param refreshToken Refresh token
*/
@Creator
public TokenRefreshRequest(String grantType, String refreshToken) {
this.grantType = grantType;
this.refreshToken = refreshToken;
}

/**
* grantType getter.
* @return e.g refresh_token
Expand Down

0 comments on commit fb2998a

Please sign in to comment.