forbid password grant type in HEART mode

pull/1046/head
Justin Richer 2016-03-10 12:30:48 -05:00
parent 52061ff05a
commit d75bba218d
1 changed files with 4 additions and 0 deletions

View File

@ -272,6 +272,10 @@ public class DefaultOAuth2ClientDetailsEntityService implements ClientDetailsEnt
}
if (client.getGrantTypes().contains("password")) {
throw new IllegalArgumentException("[HEART mode] Password grant type is forbidden");
}
// make sure we don't have a client secret
if (!Strings.isNullOrEmpty(client.getClientSecret())) {
throw new IllegalArgumentException("[HEART mode] Client secrets are not allowed");