Skip to content

Commit 2ffe1fc

Browse files
committed
fixed comparison of client IDs in refresh token, closes mitreid-connect#752
Also addresses mitreid-connect#735 (again)
1 parent be12c25 commit 2ffe1fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/DefaultOAuth2ProviderTokenService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public OAuth2AccessTokenEntity refreshAccessToken(String refreshTokenValue, Auth
213213

214214
// make sure that the client requesting the token is the one who owns the refresh token
215215
ClientDetailsEntity requestingClient = clientDetailsService.loadClientByClientId(authRequest.getClientId());
216-
if (requestingClient.getClientId() != client.getClientId()) {
216+
if (!client.getClientId().equals(requestingClient.getClientId())) {
217217
tokenRepository.removeRefreshToken(refreshToken);
218218
throw new InvalidClientException("Client does not own the presented refresh token");
219219
}

0 commit comments

Comments
 (0)