Skip to content

Commit d75bba2

Browse files
committed
forbid password grant type in HEART mode
1 parent 52061ff commit d75bba2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ private void checkHeartMode(ClientDetailsEntity client) {
272272

273273
}
274274

275+
if (client.getGrantTypes().contains("password")) {
276+
throw new IllegalArgumentException("[HEART mode] Password grant type is forbidden");
277+
}
278+
275279
// make sure we don't have a client secret
276280
if (!Strings.isNullOrEmpty(client.getClientSecret())) {
277281
throw new IllegalArgumentException("[HEART mode] Client secrets are not allowed");

0 commit comments

Comments
 (0)